[openwrt/openwrt] build: add whatdepends target to imagebuilder
LEDE Commits
lede-commits at lists.infradead.org
Mon Aug 31 06:29:56 EDT 2020
dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/84024e245f346cdf1da955cea4ab4c2c0a0886b2
commit 84024e245f346cdf1da955cea4ab4c2c0a0886b2
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Thu Aug 20 15:44:51 2020 -1000
build: add whatdepends target to imagebuilder
The package manager `opkg` offers the function `whatdepends` to print
packages that depend on a specific package.
This feature is useful when used in a CI to not only build an upgraded
package but all packages with a dependency.
Usage:
make whatdepends PACKAGE=libipset
The resulting list can be fed into a SDK building all packages and warn
if anything fails.
Signed-off-by: Paul Spooren <mail at aparcar.org>
---
target/imagebuilder/files/Makefile | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 326dd2ba2f..27d3cfa8df 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -220,4 +220,12 @@ manifest: FORCE
$(if $(PROFILE),USER_PROFILE="$(PROFILE_FILTER)") \
$(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)"))
-.SILENT: help info image manifest
+whatdepends: FORCE
+ifeq ($(PACKAGE),)
+ @echo 'Variable `PACKAGE` is not set but required by `whatdepends`'
+ @exit 1
+endif
+ @$(MAKE) -s package_reload
+ @$(OPKG) whatdepends -A $(PACKAGE)
+
+.SILENT: help info image manifest whatdepends
More information about the lede-commits
mailing list