From 37e0565c11240a3e1e1acec338d9695666757fa3 Mon Sep 17 00:00:00 2001 From: Andres Beltran Date: Thu, 12 Aug 2021 16:58:56 +0000 Subject: buildhistory: Add output file listing package information Currently, buildhistory does not produce a single file combining relevant information of installed packages. Produce an output file "installed-package-info.txt" listing a package's runtime name, buildtime name, its recipe, version, and size to avoid having to look up each package externally. Leave the existing package list files as-is for backwards compatibility. In order to support this efficiently, extend oe-pkgdata-util to accept multiple keys for its read-value argument. (From OE-Core rev: 1e18b514bf1f960d324a21db608c8e8e5af007ef) Signed-off-by: Andres Beltran Signed-off-by: Richard Purdie --- meta/classes/buildhistory.bbclass | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'meta/classes/buildhistory.bbclass') diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 5099e70fb7..cdcf99a499 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -499,6 +499,11 @@ buildhistory_get_installed() { cat $1/installed-package-sizes.tmp | awk '{print $2 "\tKiB\t" $1}' | sort -n -r > $1/installed-package-sizes.txt rm $1/installed-package-sizes.tmp + # Produce package info: runtime_name, buildtime_name, recipe, version, size + oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PACKAGE,PN,PV,PKGSIZE" -n -f $pkgcache > $1/installed-package-info.tmp + cat $1/installed-package-info.tmp | sort -n -r -k 5 > $1/installed-package-info.txt + rm $1/installed-package-info.tmp + # We're now done with the cache, delete it rm $pkgcache -- cgit v1.2.3-54-g00ecf