[PATCH 1/1] UBUNTU: link-headers -- only link directories which do not already exist
Tim Gardner
tim.gardner at canonical.com
Tue Mar 3 03:11:23 UTC 2009
Andy Whitcroft wrote:
> On Thu, Feb 26, 2009 at 10:57:53AM +0100, Stefan Bader wrote:
>> Andy Whitcroft wrote:
>>> Bug: #315252
>>>
>>> When building the flavour specific header link-balls we ensure we have
>>> all of the directories linked by iterating over those. However when
>>> the directory already exists due to a local file within it we do not
>>> notice the directory and link it regardless. This leaves us with
>>> stuttered links on install:
>>>
>>> /usr/src/linux-headers-2.6.28-8-generic/include/linux/linux
>>> /usr/src/linux-headers-2.6.28-8-generic/include/asm-x86/asm-x86
>>>
>>> This occurs because we check that the destination does not already
>>> exist before linking, but we only check that it is not a file. Existing
>>> directories are not matched and are relinked. Fix this to detect both.
>>>
>>> Signed-off-by: Andy Whitcroft <apw at canonical.com>
>>> ---
>>> debian/scripts/link-headers | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/debian/scripts/link-headers b/debian/scripts/link-headers
>>> index a6ce50a..9448bfe 100755
>>> --- a/debian/scripts/link-headers
>>> +++ b/debian/scripts/link-headers
>>> @@ -19,7 +19,7 @@ while read file; do
>>> dir=$file
>>> lastdir=$file
>>> - if [ -f "$hdrdir/$file" ]; then
>>> + if [ -f "$hdrdir/$file" -o -d "$hdrdir/$file" ]; then
>>> continue
>>> fi
>>>
>> Could that test in theory be "-e"?
>> Sounds like this is something to make sure quite a way back (at least Gutsy)
>
> [ -e "$hdrdir/$file" -o -L "$hdrdir/$file" ]
>
> works just as well.
>
> -apw
>
ACK
--
Tim Gardner tim.gardner at canonical.com
More information about the kernel-team
mailing list