summaryrefslogtreecommitdiff
path: root/mk/package.mk
diff options
context:
space:
mode:
authorPhil Sutter <phil.sutter@viprinet.com>2012-01-12 19:36:25 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2012-01-15 11:03:39 +0100
commit6eb624f2ea2133cfb5d8f9a6e8633c386a75a8f9 (patch)
tree007eda4c1803042ceff04eed912107b7ead61480 /mk/package.mk
parent361b9c3c78c1b51c2fc0c496b99ce99d7be423f2 (diff)
Allow leaving /etc as untouched as possible
For customized setups, it's hard to control what files get installed into /etc since in addition to the base-files package, any other package may install a sample config. When two packages provide the same file, which one of them makes it into the image depends on the order of them being installed. Solving this problem is not as trivial, as there are packages which must be allowed to install stuff into /etc. Best examples are base-files and ca-certificates. This patch solves the problem by adding another PKG_template flag "force_etc", which one can define in order to override the as well new Config.in symbol "ADK_LEAVE_ETC_ALONE".
Diffstat (limited to 'mk/package.mk')
-rw-r--r--mk/package.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/mk/package.mk b/mk/package.mk
index 07f53aa34..e69b7866f 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -159,6 +159,9 @@ endif
ifeq ($(ADK_DEBUG_STRIP),y)
$${RSTRIP} $${IDIR_$(1)} $(MAKE_TRACE)
endif
+ifeq (${ADK_LEAVE_ETC_ALONE}$(filter force_etc,$(7)),y)
+ -rm -rf $${IDIR_$(1)}/etc
+else
ifeq (${ADK_INSTALL_PACKAGE_INIT_SCRIPTS},y)
@for file in $$$$(ls ./files/*.init 2>/dev/null); do \
fname=$$$$(echo $$$$file| sed -e "s#.*/##" -e "s#.init##"); \
@@ -172,6 +175,10 @@ ifeq (${ADK_INSTALL_PACKAGE_INIT_SCRIPTS},y)
chmod 0755 "$$$$script"; \
done
endif
+ifneq (${ADK_INSTALL_PACKAGE_NETWORK_SCRIPTS},y)
+ -rm -rf $${IDIR_$(1)}/etc/network
+endif
+endif
@mkdir -p $${PACKAGE_DIR} '$${STAGING_PKG_DIR}' \
'$${STAGING_DIR}/scripts'
ifeq (,$(filter noremove,$(7)))