From patchwork Mon Feb 9 17:49:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Bizon X-Patchwork-Id: 6246 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n19Ho8Ot025108 for ; Mon, 9 Feb 2009 17:50:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754629AbZBIRuE (ORCPT ); Mon, 9 Feb 2009 12:50:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754625AbZBIRuE (ORCPT ); Mon, 9 Feb 2009 12:50:04 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:40776 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754629AbZBIRuC (ORCPT ); Mon, 9 Feb 2009 12:50:02 -0500 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id DF30094011D; Mon, 9 Feb 2009 18:49:55 +0100 (CET) Received: from [213.228.1.107] (sakura.staff.proxad.net [213.228.1.107]) by smtp1-g21.free.fr (Postfix) with ESMTP id 022B49400B7; Mon, 9 Feb 2009 18:49:52 +0100 (CET) Subject: [PATCH] fix spurious initramfs rebuild From: Maxime Bizon Reply-To: mbizon@freebox.fr To: sam@ravnborg.org Cc: linux-kbuild@vger.kernel.org Organization: Freebox Date: Mon, 09 Feb 2009 18:49:52 +0100 Message-Id: <1234201792.1951.26.camel@sakura.staff.proxad.net> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 --- 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