binutils: add ALTERNATIVES for strings (FS#3001)
authorHans Dedecker <dedeckeh@gmail.com>
Sat, 18 Apr 2020 08:34:10 +0000 (10:34 +0200)
committerRISCi_ATOM <Bob@bobcall.me>
Wed, 22 Apr 2020 00:52:12 +0000 (20:52 -0400)
Don't move strings anymore to /bin/strings to avoid clash with
busybox /usr/bin/strings but move it to /usr/bin/binutils-strings.
Use ALTERNATIVES support to install it as /usr/bin/strings

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit 5f126c541a743e2ff5d8f406128d477ab5a509b4)

package/devel/binutils/Makefile

index 291f45205a6c3543ac5e10d36abda7ad552d435d..e04611f5d31f2b25a624e0686e3424f8dd0c32ec 100644 (file)
@@ -49,6 +49,7 @@ define Package/binutils
   CATEGORY:=Development
   TITLE:=binutils
   DEPENDS:=+objdump +ar
+  ALTERNATIVES:=200:/usr/bin/strings:/usr/bin/binutils-strings
 endef
 
 define Package/objdump
@@ -114,7 +115,7 @@ endef
 define Package/binutils/install
        $(INSTALL_DIR) $(1)/usr $(1)/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/ $(1)/usr/
-       mv $(1)/usr/bin/strings $(1)/bin/strings
+       mv $(1)/usr/bin/strings $(1)/usr/bin/binutils-strings
        rm -f $(1)/usr/bin/objdump
        rm -f $(1)/usr/bin/ar
 endef