rootfs: remove unnecessary and potentially harmful force flags from opkg call
authorMatthias Schiffer <mschiffer@universe-factory.net>
Mon, 26 Sep 2016 13:25:38 +0000 (15:25 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Mon, 26 Sep 2016 15:57:58 +0000 (17:57 +0200)
Especially --force-overwrite and --force-depends will often lead to broken
images; it's better to fail the build in such cases than to silently ignore
the errors.

Instead, ignore errors in the per-device rootfs opkg remove command, so
the build doesn't break when packages can't be removed because of
dependencies.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
include/image.mk
include/rootfs.mk

index 18a3ed8..8b7d91d 100644 (file)
@@ -288,7 +288,7 @@ target-dir-%: FORCE
        -mv $(mkfs_cur_target_dir)/etc/opkg $(mkfs_cur_target_dir).opkg
        echo 'src default file://$(PACKAGE_DIR_ALL)' > $(mkfs_cur_target_dir).conf
        $(if $(mkfs_packages_remove), \
-               $(call opkg,$(mkfs_cur_target_dir)) remove \
+               -$(call opkg,$(mkfs_cur_target_dir)) remove \
                        $(mkfs_packages_remove))
        $(if $(call opkg_package_files,$(mkfs_packages_add)), \
                $(opkg_target) update && \
index 6a66100..15f71ae 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