include/package-pack: remove APK files before building package

As done for OPKG, correctly remove APK files before building package to
make sure we don't work on dirty files.

Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2024-05-22 19:33:52 +02:00
parent b569d0cc3f
commit ba7305c3e4
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7

View File

@ -205,6 +205,8 @@ $(_endef)
rm -rf $$(IDIR_$(1))
ifeq ($$(CONFIG_USE_APK),)
$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_package_wildcard,$(1))))
else
$$(call remove_ipkg_files,$(1),$$(call apk_package_files,$(call gen_package_wildcard,$(1))))
endif
mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1)) $(PKG_INFO_DIR)
$(call Package/$(1)/install,$$(IDIR_$(1)))