public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix spurious initramfs rebuild
@ 2009-02-09 17:49 Maxime Bizon
  2009-04-10 11:24 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Bizon @ 2009-02-09 17:49 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild


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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix spurious initramfs rebuild
  2009-02-09 17:49 [PATCH] fix spurious initramfs rebuild Maxime Bizon
@ 2009-04-10 11:24 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2009-04-10 11:24 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-kbuild

On Mon, Feb 09, 2009 at 06:49:52PM +0100, Maxime Bizon wrote:
> 
> 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

Applied.

	Sam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-10 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 17:49 [PATCH] fix spurious initramfs rebuild Maxime Bizon
2009-04-10 11:24 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox