[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kbuild
Subject:    [PATCH] fix spurious initramfs rebuild
From:       Maxime Bizon <mbizon () freebox ! fr>
Date:       2009-02-09 17:49:52
Message-ID: 1234201792.1951.26.camel () sakura ! staff ! proxad ! net
[Download RAW message or body]


Hello,



When gen_initramfs_list is used to generate make dependencies, it
includes symbolic links, for which make tracks the link target. Any
change to that target will cause an initramfs rebuild, even if the
symlink points to something outside of the initramfs directory.

If the target happens to be /tmp, the rebuild occurs for each kernel
build, since gen_initramfs_list uses mktemp...

Proposed way to fix it is to omit symbolic links from generated
dependencies, but this has a small drawback: changing perm/owner on a
symlink will go unnoticed.


Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

--- linux-2.6.28.4/scripts/gen_initramfs_list.sh.old	2009-02-09 18:22:26.000000000 +0100
+++ linux-2.6.28.4/scripts/gen_initramfs_list.sh	2009-02-09 18:21:54.000000000 +0100
@@ -97,7 +97,7 @@
 }
 
 list_parse() {
-	echo "$1 \\"
+	[ ! -L "$1" ] && echo "$1 \\" || :
 }
 
 # for each file print a line in following format


-- 
Maxime


--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic