summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-06-11 13:18:55 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-12 11:05:53 +0100
commita8ff3141fd78442bf328c9d3a489db88ad27486b (patch)
tree4910919db5894a0daa00ba2b7da0ae836b127e5d /meta/classes
parent8a2b55c5b7c544ec15113bc21e5c62276449c9c3 (diff)
downloadopenembedded-core-a8ff3141fd78442bf328c9d3a489db88ad27486b.tar.gz
openembedded-core-a8ff3141fd78442bf328c9d3a489db88ad27486b.tar.bz2
openembedded-core-a8ff3141fd78442bf328c9d3a489db88ad27486b.zip
package_rpm: Add capability to directly query packageorigin
Add functionality to RPM to directly query the packageorigin (path) from the resolver database, instead of having to do this via an indirect method. This results in a minor performance improvement. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_rpm.bbclass18
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 35928abb91..097fa1227a 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -130,12 +130,12 @@ resolve_package_rpm () {
shift
local pkg_name=""
for solve in `cat ${conffile}`; do
- pkg_name=$(${RPM} -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --yaml $@ | grep -i 'Packageorigin' | cut -d : -f 2)
- if [ -n "$pkg_name" ]; then
+ pkg_name=$(${RPM} -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --qf "%{packageorigin}\n" "$@" | grep -v "is not installed" || true)
+ if [ -n "$pkg_name" -a "$pkg_name" != "(none)" ]; then
+ echo $pkg_name
break;
fi
done
- echo $pkg_name
}
# rpm common command and options
@@ -401,9 +401,9 @@ package_install_internal_rpm () {
# Now that we have a solution, pull out a list of what to install...
echo "Manifest: ${target_rootfs}/install/install.manifest"
- ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --yaml \
+ ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
-D "__dbi_txn create nofsync private" \
- | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/install_solution.manifest
+ > ${target_rootfs}/install/install_solution.manifest
touch ${target_rootfs}/install/install_multilib_solution.manifest
@@ -421,9 +421,9 @@ package_install_internal_rpm () {
# Now that we have a solution, pull out a list of what to install...
echo "Manifest: ${target_rootfs}/install/install_multilib.manifest"
- ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --yaml \
+ ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
-D "__dbi_txn create nofsync private" \
- | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/install_multilib_solution.manifest
+ > ${target_rootfs}/install/install_multilib_solution.manifest
fi
@@ -478,9 +478,9 @@ EOF
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
${target_rootfs}/install/initial_install.manifest
- ${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --yaml \
+ ${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --qf "%{packageorigin}\n" \
-D "__dbi_txn create nofsync private" \
- | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/initial_solution.manifest
+ > ${target_rootfs}/install/initial_solution.manifest
rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest