kernel: update kernel 4.4 to version 4.4.28
[openwrt/openwrt.git] / include / rootfs.mk
index 6a6610019f6a4fb6c07c9c45feea338e202df1fa..b1617215a3ecfc1f380c8aad46c76022545fccc3 100644 (file)
@@ -40,10 +40,7 @@ opkg = \
   TMPDIR=$(1)/tmp \
   $(STAGING_DIR_HOST)/bin/opkg \
        --offline-root $(1) \
-       --force-depends \
-       --force-overwrite \
        --force-postinstall \
-       --force-maintainer \
        --add-dest root:/ \
        --add-arch all:100 \
        --add-arch $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD)):200
@@ -63,6 +60,11 @@ define prepare_rootfs
                cd $(1); \
                for script in ./usr/lib/opkg/info/*.postinst; do \
                        IPKG_INSTROOT=$(1) $$(which bash) $$script; \
+                       ret=$$?; \
+                       if [ $$ret -ne 0 ]; then \
+                               echo "postinst script $$script has failed with exit code $$ret" >&2; \
+                               exit 1; \
+                       fi; \
                done; \
                for script in ./etc/init.d/*; do \
                        grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \