mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
classes/buildhistory: optimise getting package size list
Invoking oe-pkgdata-util in turn for every package in the list was slow with a large image. Modify oe-pkgdata-util's read-value command to take an option to read the list of packages from a file, as well as prefix the value with the package name; we can then use this to get all of the package sizes at once. This reduces the time to gather this information from minutes to just a second or two. Fixes [YOCTO #7339]. (From OE-Core rev: 51c24904cc1bc823bccc3f179b8d7a192dace168) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
af5f423887
commit
4d364f27e7
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Based in part on testlab.bbclass and packagehistory.bbclass
|
||||
#
|
||||
# Copyright (C) 2011-2014 Intel Corporation
|
||||
# Copyright (C) 2011-2016 Intel Corporation
|
||||
# Copyright (C) 2007-2011 Koen Kooi <koen@openembedded.org>
|
||||
#
|
||||
|
||||
@@ -416,15 +416,8 @@ buildhistory_get_installed() {
|
||||
rm $1/depends.tmp
|
||||
|
||||
# Produce installed package sizes list
|
||||
printf "" > $1/installed-package-sizes.tmp
|
||||
cat $pkgcache | while read pkg pkgfile pkgarch
|
||||
do
|
||||
size=`oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PKGSIZE" ${pkg}_${pkgarch}`
|
||||
if [ "$size" != "" ] ; then
|
||||
echo "$size $pkg" >> $1/installed-package-sizes.tmp
|
||||
fi
|
||||
done
|
||||
cat $1/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}' > $1/installed-package-sizes.txt
|
||||
oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PKGSIZE" -n -f $pkgcache > $1/installed-package-sizes.tmp
|
||||
cat $1/installed-package-sizes.tmp | awk '{print $2 "\tKiB " $1}' | sort -n -r > $1/installed-package-sizes.txt
|
||||
rm $1/installed-package-sizes.tmp
|
||||
|
||||
# We're now done with the cache, delete it
|
||||
|
||||
Reference in New Issue
Block a user