summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_rpm.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-28 11:13:51 +0100
commitd0b8a98c5b46c305afd389fc862b3bf0c6f1eaab (patch)
tree7485d204911e135a5ab927f046152db9cee550ba /meta/classes/rootfs_rpm.bbclass
parent3ba9c0757eb51a0bb5873f4faae023587a33cc1d (diff)
downloadopenembedded-core-contrib-d0b8a98c5b46c305afd389fc862b3bf0c6f1eaab.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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r--meta/classes/rootfs_rpm.bbclass33
1 files changed, 4 insertions, 29 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 1cc4a84495..c9258dfe39 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -143,40 +143,15 @@ RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}" \
list_installed_packages() {
if [ "$1" = "arch" ] ; then
${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]"
+ elif [ "$1" = "file" ] ; then
+ ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{PACKAGEORIGIN}\n]"
else
${RPM_QUERY_CMD} -qa --qf "[%{NAME}\n]"
fi
}
-get_package_filename() {
- resolve_package_rpm ${RPMCONF_TARGET_BASE}-base_archs.conf $1
-}
-
-list_package_depends() {
- pkglist=`list_installed_packages`
-
- # REQUIRE* lists "soft" requirements (which we know as recommends and RPM refers to
- # as "suggests") so filter these out with the help of awk
- for req in `${RPM_QUERY_CMD} -q --qf "[%{REQUIRENAME} %{REQUIREFLAGS}\n]" $1 | awk '{ if( and($2, 0x80000) == 0) print $1 }'`; do
- if echo "$req" | grep -q "^rpmlib" ; then continue ; fi
-
- realpkg=""
- for dep in $pkglist; do
- if [ "$dep" = "$req" ] ; then
- realpkg="1"
- echo $req
- break
- fi
- done
-
- if [ "$realdep" = "" ] ; then
- ${RPM_QUERY_CMD} -q --whatprovides $req --qf "%{NAME}\n"
- fi
- done
-}
-
-list_package_recommends() {
- ${RPM_QUERY_CMD} -q --suggests $1
+rootfs_list_installed_depends() {
+ rpmresolve -d $INSTALL_ROOTFS_RPM/${rpmlibdir}
}
rootfs_install_packages() {