summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-10-13 02:54:34 +0200
committerJo-Philipp Wich <jo@mein.io>2016-11-02 01:01:35 +0100
commit317b3556a494b2c6f02ef3e965ac42e77342ee4e (patch)
tree2742ea9376a1830d13964969e7d0ba98a82b6cc9 /include
parentf64360c7ca8b09e73840b4e633531b372f02bdaf (diff)
downloadmtk-20170518-317b3556a494b2c6f02ef3e965ac42e77342ee4e.zip
mtk-20170518-317b3556a494b2c6f02ef3e965ac42e77342ee4e.tar.gz
mtk-20170518-317b3556a494b2c6f02ef3e965ac42e77342ee4e.tar.bz2
include: properly update .install stamp files
Right now the $(PKG_INSTALL_STAMP) files are only written if a package is selected as <*> but never deleted or emptied if the corresponding package is getting deselected. For ordinary packages this usually is no problem as the package/install recipe performs its own check for enabled packages when assembling the list of install stamp files to consider, but this logic might fail under certain circumstances for packages providing multiple build variants. In case of a multi-variant package, the buildroot first checks if any of the variants is enabled, then resolves all variants of the common source package and finally processes the corresponding .install stamp files of all variants, relying on the assumption that only the selected .install stamp file exists. When an initially selected variant is getting deselected or changed from <*> to <m> and another variant is marked as <*> instead, the .install stamp file of the deselected variant remains unchanged and a second .install stamp file for the newly selected variant is getting created, causing the package/install recipe to pick up two .install stamps with conflicting variants, leading to opkg file clashes. This issue happens for example if package "ip" is set to <m> and package "ip-full" to <*> - the install command will eventually fail with: * check_conflicts_for: The following packages conflict with ip: * check_conflicts_for: ip-full * * opkg_install_cmd: Cannot install package ip. In order to fix the problem, always process the removal requests or the .install stamp files, even for deselected packages but only write the package base name into the stamp file if the corresponding package is marked as builtin. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include')
-rw-r--r--include/package-ipkg.mk16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index 2591f5e..c90eeb2 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -103,20 +103,20 @@ ifeq ($(DUMP),)
ifneq ($(ABI_VERSION),)
compile: $(PKG_INFO_DIR)/$(1).version
endif
+ else
+ $(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected))
+ endif
- ifeq ($(CONFIG_PACKAGE_$(1)),y)
- .PHONY: $(PKG_INSTALL_STAMP).$(1)
- compile: $(PKG_INSTALL_STAMP).$(1)
- $(PKG_INSTALL_STAMP).$(1):
+ .PHONY: $(PKG_INSTALL_STAMP).$(1)
+ compile: $(PKG_INSTALL_STAMP).$(1)
+ $(PKG_INSTALL_STAMP).$(1):
if [ -f $(PKG_INSTALL_STAMP).clean ]; then \
rm -f \
$(PKG_INSTALL_STAMP) \
$(PKG_INSTALL_STAMP).clean; \
- fi; \
+ fi
+ ifeq ($(CONFIG_PACKAGE_$(1)),y)
echo "$(1)" >> $(PKG_INSTALL_STAMP)
- endif
- else
- $(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected))
endif
endif
endif