imagebuilder: fix APK package_depends support
authorRobert Marko <robimarko@gmail.com>
Tue, 19 Nov 2024 22:38:02 +0000 (23:38 +0100)
committerRobert Marko <robimarko@gmail.com>
Wed, 20 Nov 2024 08:49:21 +0000 (09:49 +0100)
Currently trying to use the 'package_depends' feature of ImageBuilder will
result in it trying to call OPKG:
make package_depends PACKAGE="usbutils"
OK: 26 MiB in 142 packages
bash: line 1: openwrt-imagebuilder-qualcommax-ipq807x.Linux-x86_64/staging_dir/host/bin/opkg: No such file or directory
make: *** [Makefile:363: package_depends] Error 127

It looks like a copy/paste error when APK support was being added, so lets
fix it by calling APK and its "info --depends" command.

Fixes: #16996
Fixes: d788ab376f85 ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/17022
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/imagebuilder/files/Makefile

index 2c6e26e4eec98e9dfcf5b970ad3afd6fa4effccf..125cc798fc8fb921db1e2e07096534a2caaacf5b 100644 (file)
@@ -363,7 +363,7 @@ endif
 ifeq ($(CONFIG_USE_APK),)
        @$(OPKG) depends -A $(PACKAGE)
 else
-       @$(OPKG) whatdepends -A $(PACKAGE)
+       @$(APK) info --depends $(PACKAGE)
 endif
 
 .SILENT: help info image manifest package_whatdepends package_depends