diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-08-15 18:04:35 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-16 11:44:16 +0100 |
commit | 855b3252d968e7bb93b4b318b7a26336dd8ea375 (patch) | |
tree | 96844e624521099806b340e18d79628b0c70eaad /meta/classes | |
parent | 23575b4fdbeafcbd688d169775e6ca9aa51515b7 (diff) | |
download | poky-855b3252d968e7bb93b4b318b7a26336dd8ea375.tar.gz |
classes/buildhistory: record size of installed package not compressed archive
* usually it's more important to know how much space will each
package take on target device then size of compressed package
* example for libewebkit0 with 4 different architectures, interesting
that om_gta02 .ipk is bigger but it's smaller when installed
before:
MACHINE DEFAULTTUNE SIZE (.ipk file)
om_gta04 cortexa8t-neon 15996 KiB libewebkit0
qemux86_64 x86-64 16992 KiB libewebkit0
spitz xscale 16148 KiB libewebkit0
om_gta02 arm920t 16260 KiB libewebkit0
after:
MACHINE DEFAULTTUNE SIZE (installed)
om_gta04 cortexa8t-neon 60544 KiB libewebkit0
qemux86_64 x86-64 63720 KiB libewebkit0
spitz xscale 60588 KiB libewebkit0
om_gta02 arm920t 56268 KiB libewebkit0
(From OE-Core rev: 85e4a77138381a6086d5ebd3a28cb5a94bc26a19)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 12 | ||||
-rw-r--r-- | meta/classes/package_rpm.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/populate_sdk_deb.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/populate_sdk_ipk.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/populate_sdk_rpm.bbclass | 2 |
5 files changed, 16 insertions, 12 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 1c49831978..b2e5cc50e8 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -337,12 +337,14 @@ buildhistory_get_installed() { | |||
337 | 337 | ||
338 | # Produce installed package sizes list | 338 | # Produce installed package sizes list |
339 | printf "" > $1/installed-package-sizes.tmp | 339 | printf "" > $1/installed-package-sizes.tmp |
340 | cat $pkgcache | while read pkg pkgfile | 340 | cat $pkgcache | while read pkg pkgfile pkgarch |
341 | do | 341 | do |
342 | if [ -f $pkgfile ] ; then | 342 | for vendor in ${TARGET_VENDOR} ${MULTILIB_VENDORS} ; do |
343 | pkgsize=`du -k $pkgfile | head -n1 | awk '{ print $1 }'` | 343 | size=`oe-pkgdata-util read-value ${TMPDIR}/pkgdata $vendor-${TARGET_OS} "PKGSIZE" ${pkg}_${pkgarch}` |
344 | echo $pkgsize $pkg >> $1/installed-package-sizes.tmp | 344 | if [ "$size" != "" ] ; then |
345 | fi | 345 | echo "$size $pkg" >> $1/installed-package-sizes.tmp |
346 | fi | ||
347 | done | ||
346 | done | 348 | done |
347 | cat $1/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}' > $1/installed-package-sizes.txt | 349 | cat $1/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}' > $1/installed-package-sizes.txt |
348 | rm $1/installed-package-sizes.tmp | 350 | rm $1/installed-package-sizes.tmp |
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 324d83f751..53377a4e7f 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -127,6 +127,8 @@ translate_smart_to_oe() { | |||
127 | #echo "$pkg -> $new_pkg" >&2 | 127 | #echo "$pkg -> $new_pkg" >&2 |
128 | if [ "$arg1" = "arch" ]; then | 128 | if [ "$arg1" = "arch" ]; then |
129 | echo $new_pkg $new_arch $other | 129 | echo $new_pkg $new_arch $other |
130 | elif [ "$arg1" = "file" ]; then | ||
131 | echo $new_pkg $other $new_arch | ||
130 | else | 132 | else |
131 | echo $new_pkg $other | 133 | echo $new_pkg $other |
132 | fi | 134 | fi |
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass index 3e123ac561..ec116ab187 100644 --- a/meta/classes/populate_sdk_deb.bbclass +++ b/meta/classes/populate_sdk_deb.bbclass | |||
@@ -75,13 +75,13 @@ list_installed_packages() { | |||
75 | # Here we want the PACKAGE_ARCH not the deb architecture | 75 | # Here we want the PACKAGE_ARCH not the deb architecture |
76 | ${DPKG_QUERY_COMMAND} -W -f='${Package} ${PackageArch}\n' | 76 | ${DPKG_QUERY_COMMAND} -W -f='${Package} ${PackageArch}\n' |
77 | elif [ "$1" = "file" ] ; then | 77 | elif [ "$1" = "file" ] ; then |
78 | ${DPKG_QUERY_COMMAND} -W -f='${Package} ${Package}_${Version}_${Architecture}.deb\n' | while read pkg pkgfile | 78 | ${DPKG_QUERY_COMMAND} -W -f='${Package} ${Package}_${Version}_${Architecture}.deb ${PackageArch}\n' | while read pkg pkgfile pkgarch |
79 | do | 79 | do |
80 | fullpath=`find ${DEPLOY_DIR_DEB} -name "$pkgfile" || true` | 80 | fullpath=`find ${DEPLOY_DIR_DEB} -name "$pkgfile" || true` |
81 | if [ "$fullpath" = "" ] ; then | 81 | if [ "$fullpath" = "" ] ; then |
82 | echo "$pkg $pkgfile" | 82 | echo "$pkg $pkgfile $pkgarch" |
83 | else | 83 | else |
84 | echo "$pkg $fullpath" | 84 | echo "$pkg $fullpath $pkgarch" |
85 | fi | 85 | fi |
86 | done | 86 | done |
87 | else | 87 | else |
diff --git a/meta/classes/populate_sdk_ipk.bbclass b/meta/classes/populate_sdk_ipk.bbclass index 4e14d9a3a6..04c71af42e 100644 --- a/meta/classes/populate_sdk_ipk.bbclass +++ b/meta/classes/populate_sdk_ipk.bbclass | |||
@@ -61,13 +61,13 @@ list_installed_packages() { | |||
61 | if [ "$1" = "arch" ] ; then | 61 | if [ "$1" = "arch" ] ; then |
62 | opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -a | 62 | opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -a |
63 | elif [ "$1" = "file" ] ; then | 63 | elif [ "$1" = "file" ] ; then |
64 | opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -f | while read pkg pkgfile | 64 | opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -f | while read pkg pkgfile pkgarch |
65 | do | 65 | do |
66 | fullpath=`find ${DEPLOY_DIR_IPK} -name "$pkgfile" || true` | 66 | fullpath=`find ${DEPLOY_DIR_IPK} -name "$pkgfile" || true` |
67 | if [ "$fullpath" = "" ] ; then | 67 | if [ "$fullpath" = "" ] ; then |
68 | echo "$pkg $pkgfile" | 68 | echo "$pkg $pkgfile $pkgarch" |
69 | else | 69 | else |
70 | echo "$pkg $fullpath" | 70 | echo "$pkg $fullpath $pkgarch" |
71 | fi | 71 | fi |
72 | done | 72 | done |
73 | else | 73 | else |
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass index 219cd185ce..dd5f39a100 100644 --- a/meta/classes/populate_sdk_rpm.bbclass +++ b/meta/classes/populate_sdk_rpm.bbclass | |||
@@ -161,7 +161,7 @@ list_installed_packages() { | |||
161 | if [ "$1" = "arch" ]; then | 161 | if [ "$1" = "arch" ]; then |
162 | ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe arch | 162 | ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe arch |
163 | elif [ "$1" = "file" ]; then | 163 | elif [ "$1" = "file" ]; then |
164 | ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN}\n]" | translate_smart_to_oe | 164 | ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN}\n]" | translate_smart_to_oe file |
165 | else | 165 | else |
166 | ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe | 166 | ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe |
167 | fi | 167 | fi |