X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/3d71087b14c61fb6ae91cdc7ed563c7823a30022..0b09e23cfc42d0d31c31cdee1a6a196045f1f4d3:/include/package-ipkg.mk?ds=sidebyside diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index edee6a4c5..512e40186 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -49,6 +49,7 @@ ifeq ($(DUMP),) IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1) INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list + KEEP_$(1):=$(strip $(call Package/$(1)/conffiles)) ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT)) ifdef Package/$(1)/install @@ -101,6 +102,7 @@ ifeq ($(DUMP),) echo "Provides: $(PROVIDES)"; \ echo "Source: $(SOURCE)"; \ echo "Section: $(SECTION)"; \ + echo "Status: unknown $(if $(filter hold,$(PKG_FLAGS)),hold,ok) not-installed"; \ echo "Priority: $(PRIORITY)"; \ echo "Maintainer: $(MAINTAINER)"; \ echo "Architecture: $(PKGARCH)"; \ @@ -111,6 +113,20 @@ ifeq ($(DUMP),) (cd $$(IDIR_$(1))/CONTROL; \ $($(1)_COMMANDS) \ ) + + ifneq ($$(KEEP_$(1)),) + @( \ + keepfiles=""; \ + for x in $$(KEEP_$(1)); do \ + [ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \ + done; \ + [ -z "$keepfiles" ] || { \ + mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \ + for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \ + }; \ + ) + endif + $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) @[ -f $$(IPKG_$(1)) ]