aboutsummaryrefslogtreecommitdiffstats
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-29 10:16:15 +0100
commit20ad566d609bccdadf871dab1bc31a0e243f8710 (patch)
treefaea9496677371ab81ea2704183c01ce54d088df /meta/classes/rootfs_rpm.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_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() {