aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2016-12-07 16:19:08 +0100
committerJohn Crispin <john@phrozen.org>2016-12-20 09:35:36 +0100
commitb5222924059f5146007a02e33d317f2c04d7dd0b (patch)
treed5f62a6cd79aed861be11e0d68562b52c85884af /include
parent3c1f20d0bb390f911c3da3334c6d94c19609c8c4 (diff)
downloadupstream-b5222924059f5146007a02e33d317f2c04d7dd0b.tar.gz
upstream-b5222924059f5146007a02e33d317f2c04d7dd0b.tar.bz2
upstream-b5222924059f5146007a02e33d317f2c04d7dd0b.zip
base-files: add support for overlaying rootfs content
This adds support for install-overlay define. When used in package it allows installing files to a special directory that gets copied to the root when installing it. It allows overwriting files provided by other packages. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'include')
-rw-r--r--include/package-ipkg.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index afd2d4ef7a..e168eb390f 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -96,7 +96,14 @@ ifeq ($(DUMP),)
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
ifeq ($(BUILD_VARIANT),$$(if $$(VARIANT),$$(VARIANT),$(BUILD_VARIANT)))
+ do_install=
ifdef Package/$(1)/install
+ do_install=yes
+ endif
+ ifdef Package/$(1)/install-overlay
+ do_install=yes
+ endif
+ ifdef do_install
ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
IPKGS += $(1)
compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(STAGING_DIR_ROOT)/stamp/.$(1)_installed
@@ -178,6 +185,8 @@ $(_endef)
@rm -rf $$(IDIR_$(1)) $$(call opkg_package_files,$(1))
mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
$(call Package/$(1)/install,$$(IDIR_$(1)))
+ $(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay)
+ $(call Package/$(1)/install-overlay,$$(IDIR_$(1))/rootfs-overlay)
-find $$(IDIR_$(1)) -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| $(XARGS) rm -rf
@( \
find $$(IDIR_$(1)) -name lib\*.so\* -or -name \*.ko | awk -F/ '{ print $$$$NF }'; \