[PATCH 1/1] UBUNTU: link-headers -- only link directories which do not already exist

Andy Whitcroft apw at canonical.com
Wed Feb 25 17:48:18 UTC 2009


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
 
-- 
1.6.1.2.419.g0d87e





More information about the kernel-team mailing list