diff mbox series

[1/4] target/imagebuilder: add depends target to show all package that gets installed

Message ID 20210819072913.1825-1-fe@dev.tdt.de
State New
Headers show
Series [1/4] target/imagebuilder: add depends target to show all package that gets installed | expand

Commit Message

Florian Eckert Aug. 19, 2021, 7:29 a.m. UTC
This commits adds the makefile targets `package_depends` this wrapper is a call
to `opkg depends`. This command shows what install dependencies exist when the
package is installed into the image

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
---
 target/imagebuilder/files/Makefile | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index aeae98aacd..c232d510a6 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -34,6 +34,7 @@  Available Commands:
 	info:	Show a list of available target profiles
 	clean:	Remove images and temporary build files
 	image:	Build an image (see below for more information).
+	package_depends: Show installation dependency of the package
 
 Building images:
 	By default 'make image' will create an image with the default
@@ -56,6 +57,12 @@  Print manifest:
 	make manifest PACKAGES="<pkg1> [<pkg2> [<pkg3> ...]]" # include extra packages
 	make manifest STRIP_ABI=1 # remove ABI version from printed package names
 
+package_depends:
+	List "all" packages dependency of the package
+	You can use the following parameters:
+
+	make package_depends PACKAGE="<pkg>"
+
 endef
 $(eval $(call shexport,Helptext))
 
@@ -261,4 +268,13 @@  endif
 	@$(MAKE) -s package_reload
 	@$(OPKG) whatdepends -A $(PACKAGE)
 
-.SILENT: help info image manifest whatdepends
+package_depends: FORCE
+ifeq ($(PACKAGE),)
+	@echo 'Variable `PACKAGE` is not set but required by `package_depends`'
+	@exit 1
+endif
+	@$(MAKE) -s package_reload
+	@$(OPKG) depends -A $(PACKAGE)
+
+
+.SILENT: help info image manifest whatdepends package_depends