]> git.openpandora.org Git - openembedded.git/commitdiff
busybox: prevent postinst script from failing
authorSergey Lapin <slapin@ossfans.org>
Thu, 22 Apr 2010 10:31:48 +0000 (14:31 +0400)
committerSergey Lapin <slapin@ossfans.org>
Thu, 22 Apr 2010 10:44:03 +0000 (14:44 +0400)
recent addition in rootfs_ipk.bbclass which runs postinst scripts with
-e option, while very useful, prevents busybox from configuring at image
build time. It will be configured at first image boot if your file
system is writable, but in case of e.g. squashfs, that will be fatal
error. This commit prevents postinst to fail, so busybox will create
all needed links at image build time.

recipes/busybox/busybox.inc

index 1ee263ad9093611395f4bd98d98320738ca763f2..17d8d14a84dbb128903ae0ca83145386b382eaa2 100644 (file)
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
 SECTION = "base"
 PRIORITY = "required"
 
-INC_PR = "r26"
+INC_PR = "r27"
 
 SRC_URI = "\
   file://busybox-cron \
@@ -142,7 +142,9 @@ pkg_postinst_${PN} () {
        if test "x$D" = "x"; then while read link; do if test ! -h "$link"; then case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; /*) to="/bin/busybox";; esac; busybox ln -s $to $link; fi; done </etc/busybox.links; fi
 
        # This adds the links, remember that this has to work when building an image too, hence the $D
+    set +e
        while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; /*) to="/bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links
+    set -e
 }
 
 pkg_postinst_${PN}-mountall () {