All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] dtbsinstall: don't move target directory out of the way
@ 2015-10-20 13:01 Russell King
  2015-10-20 13:20 ` Jason Cooper
  0 siblings, 1 reply; 6+ messages in thread
From: Russell King @ 2015-10-20 13:01 UTC (permalink / raw)
  To: Jason Cooper, Grant Likely, Rob Herring; +Cc: Michal Marek, linux-kbuild

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>
---
 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


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

* Re: [PATCH RESEND] dtbsinstall: don't move target directory out of the way
  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
  2016-01-27 20:18   ` Russell King - ARM Linux
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Cooper @ 2015-10-20 13:20 UTC (permalink / raw)
  To: Russell King; +Cc: Grant Likely, Rob Herring, Michal Marek, linux-kbuild

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
> 

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

* Re: [PATCH RESEND] dtbsinstall: don't move target directory out of the way
  2015-10-20 13:20 ` Jason Cooper
@ 2016-01-27 20:18   ` Russell King - ARM Linux
  2016-01-27 21:32     ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux @ 2016-01-27 20:18 UTC (permalink / raw)
  To: Grant Likely, Rob Herring, Michal Marek, linux-kbuild; +Cc: Jason Cooper

So what needs to happen to get this change merged?

On Tue, Oct 20, 2015 at 01:20:02PM +0000, Jason Cooper wrote:
> 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
> > 

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

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

* Re: [PATCH RESEND] dtbsinstall: don't move target directory out of the way
  2016-01-27 20:18   ` Russell King - ARM Linux
@ 2016-01-27 21:32     ` Michal Marek
  2016-01-28  1:13       ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Marek @ 2016-01-27 21:32 UTC (permalink / raw)
  To: Russell King - ARM Linux, Grant Likely, Rob Herring, linux-kbuild
  Cc: Jason Cooper

Dne 27.1.2016 v 21:18 Russell King - ARM Linux napsal(a):
> So what needs to happen to get this change merged?

Rob, Grant, shall I merged it to the kbuild tree or do you want to take it?

Thanks,
Michal


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

* Re: [PATCH RESEND] dtbsinstall: don't move target directory out of the way
  2016-01-27 21:32     ` Michal Marek
@ 2016-01-28  1:13       ` Rob Herring
  2016-01-28 10:44         ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2016-01-28  1:13 UTC (permalink / raw)
  To: Michal Marek
  Cc: Russell King - ARM Linux, Grant Likely,
	Linux Kbuild mailing list, Jason Cooper

On Wed, Jan 27, 2016 at 3:32 PM, Michal Marek <mmarek@suse.com> wrote:
> Dne 27.1.2016 v 21:18 Russell King - ARM Linux napsal(a):
>> So what needs to happen to get this change merged?
>
> Rob, Grant, shall I merged it to the kbuild tree or do you want to take it?

Yes, please take it.

Acked-by: Rob Herring <robh@kernel.org>

Rob

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

* Re: [PATCH RESEND] dtbsinstall: don't move target directory out of the way
  2016-01-28  1:13       ` Rob Herring
@ 2016-01-28 10:44         ` Michal Marek
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Marek @ 2016-01-28 10:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King - ARM Linux, Grant Likely,
	Linux Kbuild mailing list, Jason Cooper

Dne 28.1.2016 v 02:13 Rob Herring napsal(a):
> On Wed, Jan 27, 2016 at 3:32 PM, Michal Marek <mmarek@suse.com> wrote:
>> Dne 27.1.2016 v 21:18 Russell King - ARM Linux napsal(a):
>>> So what needs to happen to get this change merged?
>>
>> Rob, Grant, shall I merged it to the kbuild tree or do you want to take it?
> 
> Yes, please take it.
> 
> Acked-by: Rob Herring <robh@kernel.org>

Done.

Michal


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

end of thread, other threads:[~2016-01-28 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.