Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] coreutils: handle merged usr folder
@ 2015-10-18  6:32 James Knight
  2015-10-18 15:32 ` Yann E. MORIN
  2015-10-20 21:00 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: James Knight @ 2015-10-18  6:32 UTC (permalink / raw)
  To: buildroot

For targets prepared with a usr-move, coreutils should not be attempting
to move binaries from `usr/bin` to `bin`.

Signed-off-by: James Knight <james.knight@rockwellcollins.com>
---
 package/coreutils/coreutils.mk | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
index bb2ef96..60455ac 100644
--- a/package/coreutils/coreutils.mk
+++ b/package/coreutils/coreutils.mk
@@ -99,18 +99,24 @@ COREUTILS_CONF_OPTS += --with-openssl=yes
 COREUTILS_DEPENDENCIES += openssl
 endif
 
-define COREUTILS_POST_INSTALL
+ifeq ($(BR2_ROOTFS_MERGED_USR),)
+define COREUTILS_CLEANUP_BIN
 	# some things go in root rather than usr
 	for f in $(COREUTILS_BIN_PROGS); do \
 		mv -f $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f || exit 1; \
 	done
+endef
+COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
+endif
+
+define COREUTILS_CLEANUP
 	# link for archaic shells
 	ln -fs test $(TARGET_DIR)/usr/bin/[
 	# gnu thinks chroot is in bin, debian thinks it's in sbin
 	mv -f $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
 endef
 
-COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_POST_INSTALL
+COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP
 
 # If both coreutils and busybox are selected, the corresponding applets
 # may need to be reinstated by the clean targets.
-- 
1.9.5.msysgit.1

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

* [Buildroot] [PATCH 1/1] coreutils: handle merged usr folder
  2015-10-18  6:32 [Buildroot] [PATCH 1/1] coreutils: handle merged usr folder James Knight
@ 2015-10-18 15:32 ` Yann E. MORIN
  2015-10-20 21:00 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2015-10-18 15:32 UTC (permalink / raw)
  To: buildroot

James, All,

On 2015-10-18 02:32 -0400, James Knight spake thusly:
> For targets prepared with a usr-move, coreutils should not be attempting
> to move binaries from `usr/bin` to `bin`.

For the records, pleas see comments already made on the patch doing the
same for sed:
    http://lists.busybox.net/pipermail/buildroot/2015-October/142230.html

> Signed-off-by: James Knight <james.knight@rockwellcollins.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/coreutils/coreutils.mk | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk
> index bb2ef96..60455ac 100644
> --- a/package/coreutils/coreutils.mk
> +++ b/package/coreutils/coreutils.mk
> @@ -99,18 +99,24 @@ COREUTILS_CONF_OPTS += --with-openssl=yes
>  COREUTILS_DEPENDENCIES += openssl
>  endif
>  
> -define COREUTILS_POST_INSTALL
> +ifeq ($(BR2_ROOTFS_MERGED_USR),)
> +define COREUTILS_CLEANUP_BIN
>  	# some things go in root rather than usr
>  	for f in $(COREUTILS_BIN_PROGS); do \
>  		mv -f $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f || exit 1; \
>  	done
> +endef
> +COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
> +endif
> +
> +define COREUTILS_CLEANUP
>  	# link for archaic shells
>  	ln -fs test $(TARGET_DIR)/usr/bin/[
>  	# gnu thinks chroot is in bin, debian thinks it's in sbin
>  	mv -f $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
>  endef
>  
> -COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_POST_INSTALL
> +COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP
>  
>  # If both coreutils and busybox are selected, the corresponding applets
>  # may need to be reinstated by the clean targets.
> -- 
> 1.9.5.msysgit.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] coreutils: handle merged usr folder
  2015-10-18  6:32 [Buildroot] [PATCH 1/1] coreutils: handle merged usr folder James Knight
  2015-10-18 15:32 ` Yann E. MORIN
@ 2015-10-20 21:00 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2015-10-20 21:00 UTC (permalink / raw)
  To: buildroot

>>>>> "James" == James Knight <james.d.knight@live.com> writes:

 > For targets prepared with a usr-move, coreutils should not be attempting
 > to move binaries from `usr/bin` to `bin`.

 > Signed-off-by: James Knight <james.knight@rockwellcollins.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2015-10-20 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-18  6:32 [Buildroot] [PATCH 1/1] coreutils: handle merged usr folder James Knight
2015-10-18 15:32 ` Yann E. MORIN
2015-10-20 21:00 ` Peter Korsgaard

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