aboutsummaryrefslogtreecommitdiffstats
path: root/target/imagebuilder
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2020-10-17 10:06:03 -1000
committerDaniel Golle <daniel@makrotopia.org>2020-10-30 00:39:09 +0000
commit04757f964b9dd4190b27d51914a4c0053d4a38cd (patch)
treefe5afcab815ce2d4ad08a591fd9fc69590982baf /target/imagebuilder
parent2999f810ff2c968e6bbe5b2fd32cfbd80f83570a (diff)
downloadupstream-04757f964b9dd4190b27d51914a4c0053d4a38cd.tar.gz
upstream-04757f964b9dd4190b27d51914a4c0053d4a38cd.tar.bz2
upstream-04757f964b9dd4190b27d51914a4c0053d4a38cd.zip
build,IB: reload packages/ only if existing
With the fix of external kmod feeds it is possible to ship the ImageBuilder without any packages except the pseudo packages kernel and libc. Therefore the local package feeds becomes optional. This commit adds a check to the package_reload function to only run if the local feed is existing. Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'target/imagebuilder')
-rw-r--r--target/imagebuilder/files/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 03a95dbf6e..0ce5f8b39b 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -138,7 +138,10 @@ package_index: FORCE
$(OPKG) update >&2 || true
package_reload:
- if [ ! -f "$(PACKAGE_DIR)/Packages" ] || [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ]; then \
+ if [ -d "$(PACKAGE_DIR)" ] && ( \
+ [ ! -f "$(PACKAGE_DIR)/Packages" ] || \
+ [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || \
+ [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ] ); then \
echo "Package list missing or not up-to-date, generating it." >&2 ;\
$(MAKE) package_index; \
else \