]> git.openpandora.org Git - openembedded.git/commitdiff
busybox: let update-alternatives create all symlinks, and use INC_PR
authorMichael Smith <msmith@cbnco.com>
Wed, 3 Jun 2009 20:31:03 +0000 (16:31 -0400)
committerPhil Blundell <philb@gnu.org>
Fri, 5 Jun 2009 11:00:43 +0000 (12:00 +0100)
Back in 2005, commit 5e01906b set this up; in f7f1ac27 the recipe
was changed to keep all the links in the package.

This changes it back, and also removes special treatment of the
links for crond, httpd, udhcpd, hwclock, and udhcpc.

Signed-off-by: Michael Smith <msmith@cbnco.com>
recipes/busybox/busybox-static_1.11.3.bb
recipes/busybox/busybox.inc
recipes/busybox/busybox_1.11.3.bb
recipes/busybox/busybox_1.13.2.bb
recipes/busybox/busybox_1.2.1.bb
recipes/busybox/busybox_1.2.2.bb
recipes/busybox/busybox_1.3.1.bb
recipes/busybox/busybox_1.7.2.bb
recipes/busybox/busybox_1.9.2.bb

index 9529ab7b4b3d59241fea1c1c3346d4f93915d235..6523fa90feb012982958742a3b38a94346479eed 100644 (file)
@@ -1,5 +1,5 @@
 require busybox_${PV}.bb
-PR = "r4"
+PR = "${INC_PR}.1"
 
 FILESPATH = "${FILE_DIRNAME}/busybox-${PV}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
 S = "${WORKDIR}/busybox-${PV}"
index 04f2cf40e69cd15c5ac2b559c63e2e2d93a91a38..e3121476fab4bfcdf30dc29d3df3a40cdd86f245 100644 (file)
@@ -11,6 +11,8 @@ LICENSE = "GPL"
 SECTION = "base"
 PRIORITY = "required"
 
+INC_PR = "r20"
+
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
   file://busybox-cron \
@@ -71,64 +73,30 @@ do_install () {
                mv busybox.links.new busybox.links
        fi
 
-       unset CFLAGS CPPFLAGS CXXFLAGS
        install -d ${D}${sysconfdir}/init.d
-       oe_runmake "PREFIX=${D}" install
-       cp -pPR ${S}/_install/* ${D}/
-
-       # Move everything to /busybox (not supposed to end up in any package)
-       install -d ${D}/busybox
-       ls ${D} -R
 
-       # Copy /bin and /sbin -- and /usr, if prefix is not "".
-       for i in ${D}${base_bindir} ${D}${base_sbindir} ${prefix:+${D}${prefix}}
-       do
-               if [ -d $i ]; then
-                       cp -pPR $i ${D}/busybox/
-               fi
-       done
-       # Move the busybox binary back to /bin
+       # Install /bin/busybox, and the /bin/sh link so the postinst script
+       # can run. Let update-alternatives handle the rest.
        install -d ${D}${base_bindir}
-       mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
-       # Move back the sh symlink
-       test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
+       install -m 0755 ${S}/busybox ${D}${base_bindir}
+       ln -sf busybox ${D}${base_bindir}/sh
 
        install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
        install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
        if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
-               # Move crond back to /usr/sbin/crond
-               install -d ${D}${sbindir}
-               mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
-
                install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
        fi
        if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
-               # Move httpd back to /usr/sbin/httpd
-               install -d ${D}${sbindir}
-               mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
-
                install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
                install -d ${D}/srv/www
        fi
        if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
-               # Move udhcpd back to /usr/sbin/udhcpd
-               install -d ${D}${sbindir}
-               mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
-
                install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
        fi
        if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
-               # Move hwclock back to /sbin/hwclock
-               install -d ${D}${base_sbindir}
-               mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
-
                install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
        fi
        if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
-               # Move dhcpc back to /usr/sbin/udhcpc
-               install -d ${D}${base_sbindir}
-               mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
-
                install -d ${D}${sysconfdir}/udhcpc.d
                install -d ${D}${datadir}/udhcpc
                install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
index bd03aa8cf60b74e71fe7bb893e9cca544cac5b76..673fe15ba7a46135fb03b171b39ad7cedb6021b3 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r15"
+PR = "${INC_PR}.1"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
index 96d0f0bacaa75e4507f6122f7b255947637e4ffb..c1cc51baf14f7f20b3cdb7c5f13f271f136d4d82 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r19"
+PR = "${INC_PR}.1"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
index 63a93df36fbed8c994c461940f98e1e070d136e8..3630a4662b1504a1ba9b43c1e2f072231983340e 100644 (file)
@@ -1,6 +1,6 @@
 require busybox.inc
 
-PR = "r19"
+PR = "${INC_PR}.1"
 
 SRC_URI += "file://wget-long-options.patch;patch=1 \
           file://df_rootfs.patch;patch=1 \
index fe9d07e126359ec3032e0b048d565cceeba3d129..43a15d0f57737447319015d2ea7245a5ee4c426c 100644 (file)
@@ -1,6 +1,6 @@
 require busybox.inc
 
-PR = "r5"
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
index 2cdb81b31140a1c4fd74d76bc7d0ec1c44e419de..e0fd63bf5f4429da8c52686b9fb33a27d6172313 100644 (file)
@@ -1,6 +1,6 @@
 require busybox.inc
 
-PR = "r5"
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
index 87d336b7acf18202c9b75ffc09972a1e5dd92228..6af073f39c5f4650ec9a6bf2922f7b4fa6f85f48 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r13"
+PR = "${INC_PR}.1"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
            file://busybox-cron \
index e9aa8204985c02bb5219f4ea194f4728048a5e44..64f9c620e3cf382346dd6e263d9b229e48cfa8f0 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r6"
+PR = "${INC_PR}.1"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
            file://udhcpscript.patch;patch=1 \