aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_deb.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-07-23 07:59:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-29 10:16:15 +0100
commit20ad566d609bccdadf871dab1bc31a0e243f8710 (patch)
treefaea9496677371ab81ea2704183c01ce54d088df /meta/classes/rootfs_deb.bbclass
parent98b0f956e7d16c2791cc00dbb75187b886e4cbcd (diff)
downloadopenembedded-core-contrib-20ad566d609bccdadf871dab1bc31a0e243f8710.tar.gz
buildhistory: improve performance of image info collection
Reduce the number of calls to the packaging tool, especially in the case of rpm, using helper utilities to gather the required information more efficiently where possible. (From OE-Core rev: d0b8a98c5b46c305afd389fc862b3bf0c6f1eaab) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_deb.bbclass')
-rw-r--r--meta/classes/rootfs_deb.bbclass28
1 files changed, 13 insertions, 15 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index a002b1ec02..750a8ca082 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -96,26 +96,24 @@ list_installed_packages() {
if [ "$1" = "arch" ] ; then
# Here we want the PACKAGE_ARCH not the deb architecture
${DPKG_QUERY_COMMAND} -W -f='${Package} ${PackageArch}\n'
+ elif [ "$1" = "file" ] ; then
+ ${DPKG_QUERY_COMMAND} -W -f='${Package} ${Package}_${Version}_${Architecture}.deb\n' | while read pkg pkgfile
+ do
+ fullpath=`find ${DEPLOY_DIR_DEB} -name "$pkgfile" || true`
+ if [ "$fullpath" = "" ] ; then
+ echo "$pkg $pkgfile"
+ else
+ echo "$pkg $fullpath"
+ fi
+ done
else
${DPKG_QUERY_COMMAND} -W -f='${Package}\n'
fi
}
-get_package_filename() {
- fullname=`find ${DEPLOY_DIR_DEB} -name "$1_*.deb" || true`
- if [ "$fullname" = "" ] ; then
- echo $name
- else
- echo $fullname
- fi
-}
-
-list_package_depends() {
- ${DPKG_QUERY_COMMAND} -s $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g'
-}
-
-list_package_recommends() {
- ${DPKG_QUERY_COMMAND} -s $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g'
+rootfs_list_installed_depends() {
+ # Cheat here a little bit by using the opkg query helper util
+ ${DPKG_QUERY_COMMAND} -W -f='Package: ${Package}\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n' | opkg-query-helper.py
}
rootfs_install_packages() {