summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorAndres Beltran <abeltran@linux.microsoft.com>2021-08-12 16:58:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-27 11:53:23 +0100
commit1e18b514bf1f960d324a21db608c8e8e5af007ef (patch)
treec835276b6bd8d7019334cd536da89ed1ebce1d12 /meta/classes/buildhistory.bbclass
parent143fc5504539c69752ca87717507c197a8920ce5 (diff)
downloadopenembedded-core-contrib-1e18b514bf1f960d324a21db608c8e8e5af007ef.tar.gz
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. Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass5
1 files changed, 5 insertions, 0 deletions
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