All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Cooper <jason@lakedaemon.net>
To: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>, Michal Marek <mmarek@suse.com>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH RESEND] dtbsinstall: don't move target directory out of the way
Date: Tue, 20 Oct 2015 13:20:02 +0000	[thread overview]
Message-ID: <20151020132002.GD3953@io.lakedaemon.net> (raw)
In-Reply-To: <E1ZoWXk-0007DX-SY@rmk-PC.arm.linux.org.uk>

Hey Russell,

On Tue, Oct 20, 2015 at 02:01:32PM +0100, Russell King wrote:
> No other kernel installation target moves the target directory out of
> the way, even deleting an old version of it.  These are destructive
> operations, ones which the kernel build system should not be making.
> 
> This behaviour prevents being able to do:
> 
> 	make install INSTALL_PATH=/some/path/boot
> 	make dtbs_install INSTALL_DTBS_PATH=/some/path/boot
> 
> As it causes the boot directory containing the kernel installed in
> step 1 to be moved to /some/path/boot.old.  Things get even more fun
> if you do:
> 
> 	make install dtbs_install INSTALL_PATH=/some/path/boot INSTALL_DTBS_PATH=/some/path/boot
> 
> The kernel gets installed into /some/path/boot, then the directory gets
> renamed to /some/path/boot.old, and a new directory created to hold the
> dtbs.  Even more fun if you supply -j2 when we end up with races in
> make.
> 
> Remove this behaviour.
> 
> If this behaviour is required at installation time, this should be
> done by the installation external to the kernel makefiles, just like
> it would be done for 'make modules_install'.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Jason Cooper <jason@lakedaemon.net>

fwiw, I honestly don't remember adding this brokenness, but the git
history doesn't lie:

  f4d4ffc03efc8 kbuild: dtbs_install: new make target

thx,

Jason.

> ---
>  scripts/Makefile.dtbinst | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
> index 1c15717e0d56..a1be75d0a5fd 100644
> --- a/scripts/Makefile.dtbinst
> +++ b/scripts/Makefile.dtbinst
> @@ -23,8 +23,6 @@ include $(src)/Makefile
>  PHONY += __dtbs_install_prep
>  __dtbs_install_prep:
>  ifeq ("$(dtbinst-root)", "$(obj)")
> -	$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
> -	$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
>  	$(Q)mkdir -p $(INSTALL_DTBS_PATH)
>  endif
>  
> -- 
> 2.1.0
> 

  reply	other threads:[~2015-10-20 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 13:01 [PATCH RESEND] dtbsinstall: don't move target directory out of the way Russell King
2015-10-20 13:20 ` Jason Cooper [this message]
2016-01-27 20:18   ` Russell King - ARM Linux
2016-01-27 21:32     ` Michal Marek
2016-01-28  1:13       ` Rob Herring
2016-01-28 10:44         ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151020132002.GD3953@io.lakedaemon.net \
    --to=jason@lakedaemon.net \
    --cc=grant.likely@linaro.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.