build: allow file modes per binary package

Currently the global variable PKG_FILE_MODES is used for all ipkg
creations. This works for Makefiles which output a single package, or
variants of a single package.

But if a Makefile outputs multiple packages that each contain different
files, setting PKG_FILE_MODES causes build failure when any of the files
in the variable do not exist in the folder that is currently being
packaged.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2020-09-09 12:29:50 +02:00 committed by AmadeusGhost
parent 59ae3309b4
commit 6caacbfd51
2 changed files with 2 additions and 1 deletions

View File

@ -59,6 +59,7 @@ define Package/Default
ALTERNATIVES:=
LICENSE:=$(PKG_LICENSE)
LICENSE_FILES:=$(PKG_LICENSE_FILES)
FILE_MODES:=$(PKG_FILE_MODES)
endef
Build/Patch:=$(Build/Patch/Default)

View File

@ -260,7 +260,7 @@ $(_endef)
endif
$(INSTALL_DIR) $$(PDIR_$(1))
$(FAKEROOT) $(SCRIPT_DIR)/ipkg-build -m "$(PKG_FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1))
$(FAKEROOT) $(SCRIPT_DIR)/ipkg-build -m "$(FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1))
@[ -f $$(IPKG_$(1)) ]
$(1)-clean: