bzip2: don't overwrite busybox during installation
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 7 Jul 2010 21:34:32 +0000 (23:34 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 7 Jul 2010 21:37:33 +0000 (23:37 +0200)
The bzip2 make install target follows symlinks, so if busybox is
enabled and the bzip/bunzip2 applets are installed, bin/busybox will
get overwritten by bzip2.

Fix it by ensuring any previously installed bzip2/bunzip2/bzcat (the
applets available in busybox) are removed before running make install.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/bzip2/bzip2.mk

diff --git a/CHANGES b/CHANGES
index 02edf36e36ad669480d1123c4d5ad54f103c1bb9..70ec74993e29576ea5641908f0c0721ad6edd623 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -15,8 +15,8 @@
        luafilesystem, luasocket, rings, wsapi, xavante, xterm
 
        Updated/fixed packages: berkeleydb, bash, blackbox, busybox,
-       cdrkit, dash, dialog, diffutils, distcc, dmalloc, dnsmasq,
-       dropbear, fbv, file, gawk, gstreamer, gzip, intltool,
+       bzip2, cdrkit, dash, dialog, diffutils, distcc, dmalloc,
+       dnsmasq, dropbear, fbv, file, gawk, gstreamer, gzip, intltool,
        ipsec-tools, iptables, libart, libfuse, libgpg-error, libidn,
        liblockfile, links, lmbench, lrzsz, make, module-init-tools,
        nbd, ncurses, netperf, ntfsprogs, openssl, php, qt, quagga,
index 39e18320569de7becb00e1cbad26bcf9506e39ae..3f341ee7a81e4c4798bff6e8863f49fe00f50748 100644 (file)
@@ -49,7 +49,9 @@ define BZIP2_INSTALL_STAGING_CMDS
        )
 endef
 
+# make sure busybox doesn't get overwritten by make install
 define BZIP2_INSTALL_TARGET_CMDS
+       rm -f $(addprefix $(TARGET_DIR)/usr/bin/,bzip2 bunzip2 bzcat)
        $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) \
        $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) install
        cp $(@D)/libbz2.so.$(BZIP2_SONAME) $(TARGET_DIR)/usr/lib/