diff mbox

[1/1] sed: handle merged usr folder

Message ID 1445180905-15896-1-git-send-email-james.knight@rockwellcollins.com
State Rejected
Headers show

Commit Message

James Knight Oct. 18, 2015, 3:08 p.m. UTC
For targets prepared with a usr-move, package should not be attempting
to move binaries from `usr/bin` to `bin`.

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

Comments

Yann E. MORIN Oct. 18, 2015, 3:30 p.m. UTC | #1
James, All,

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

I was looking at your coreutils patch doing the same, and was about to
suggest you also looked at sed. ;-)

However, we discussed these two changes with Thomas on IRC, and we're
not very happy that the merged /usr change implies we have to have
special handling for it in various packages... :-/

But we can't see an easy alternate solution to the problem either... :-/

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

BTW, note that we would already had the issue if a user were to provide
a custom skeleton with merged /usr .

Regards,
Yann E. MORIN.

> ---
>  package/sed/sed.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/sed/sed.mk b/package/sed/sed.mk
> index b819300..5f76e7e 100644
> --- a/package/sed/sed.mk
> +++ b/package/sed/sed.mk
> @@ -19,10 +19,11 @@ SED_CONF_OPTS = \
>  	--infodir=/usr/share/info \
>  	--include=$(STAGING_DIR)/usr/include
>  
> +ifeq ($(BR2_ROOTFS_MERGED_USR),)
>  define SED_MOVE_BINARY
>  	mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/
>  endef
> -
>  SED_POST_INSTALL_TARGET_HOOKS = SED_MOVE_BINARY
> +endif
>  
>  $(eval $(autotools-package))
> -- 
> 1.9.5.msysgit.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Peter Korsgaard Oct. 20, 2015, 8:54 p.m. UTC | #2
>>>>> "James" == James Knight <james.d.knight@live.com> writes:

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

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

A simpler fix is just to get sed to put the binary in /bin in the first
place,m so I've changed the package to configure with --bindir=/bin
instead and mark your patch as rejected.
diff mbox

Patch

diff --git a/package/sed/sed.mk b/package/sed/sed.mk
index b819300..5f76e7e 100644
--- a/package/sed/sed.mk
+++ b/package/sed/sed.mk
@@ -19,10 +19,11 @@  SED_CONF_OPTS = \
 	--infodir=/usr/share/info \
 	--include=$(STAGING_DIR)/usr/include
 
+ifeq ($(BR2_ROOTFS_MERGED_USR),)
 define SED_MOVE_BINARY
 	mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/
 endef
-
 SED_POST_INSTALL_TARGET_HOOKS = SED_MOVE_BINARY
+endif
 
 $(eval $(autotools-package))