summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
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:10:35 +0100
commit75c302ca809d25fdf7e0a3d803aefd0b846c4f54 (patch)
tree3d20070a0890579e20de226e2cc941c862a6b04d /meta/classes/package_rpm.bbclass
parentb81d788c799a576dd1dc0db573639df69d91afef (diff)
downloadpoky-75c302ca809d25fdf7e0a3d803aefd0b846c4f54.tar.gz
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. (From OE-Core rev: a8ff3141fd78442bf328c9d3a489db88ad27486b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-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 () {
130 shift 130 shift
131 local pkg_name="" 131 local pkg_name=""
132 for solve in `cat ${conffile}`; do 132 for solve in `cat ${conffile}`; do
133 pkg_name=$(${RPM} -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --yaml $@ | grep -i 'Packageorigin' | cut -d : -f 2) 133 pkg_name=$(${RPM} -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --qf "%{packageorigin}\n" "$@" | grep -v "is not installed" || true)
134 if [ -n "$pkg_name" ]; then 134 if [ -n "$pkg_name" -a "$pkg_name" != "(none)" ]; then
135 echo $pkg_name
135 break; 136 break;
136 fi 137 fi
137 done 138 done
138 echo $pkg_name
139} 139}
140 140
141# rpm common command and options 141# rpm common command and options
@@ -401,9 +401,9 @@ package_install_internal_rpm () {
401 401
402 # Now that we have a solution, pull out a list of what to install... 402 # Now that we have a solution, pull out a list of what to install...
403 echo "Manifest: ${target_rootfs}/install/install.manifest" 403 echo "Manifest: ${target_rootfs}/install/install.manifest"
404 ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --yaml \ 404 ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
405 -D "__dbi_txn create nofsync private" \ 405 -D "__dbi_txn create nofsync private" \
406 | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/install_solution.manifest 406 > ${target_rootfs}/install/install_solution.manifest
407 407
408 touch ${target_rootfs}/install/install_multilib_solution.manifest 408 touch ${target_rootfs}/install/install_multilib_solution.manifest
409 409
@@ -421,9 +421,9 @@ package_install_internal_rpm () {
421 421
422 # Now that we have a solution, pull out a list of what to install... 422 # Now that we have a solution, pull out a list of what to install...
423 echo "Manifest: ${target_rootfs}/install/install_multilib.manifest" 423 echo "Manifest: ${target_rootfs}/install/install_multilib.manifest"
424 ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --yaml \ 424 ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
425 -D "__dbi_txn create nofsync private" \ 425 -D "__dbi_txn create nofsync private" \
426 | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/install_multilib_solution.manifest 426 > ${target_rootfs}/install/install_multilib_solution.manifest
427 427
428 fi 428 fi
429 429
@@ -478,9 +478,9 @@ EOF
478 -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \ 478 -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
479 ${target_rootfs}/install/initial_install.manifest 479 ${target_rootfs}/install/initial_install.manifest
480 480
481 ${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --yaml \ 481 ${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --qf "%{packageorigin}\n" \
482 -D "__dbi_txn create nofsync private" \ 482 -D "__dbi_txn create nofsync private" \
483 | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/initial_solution.manifest 483 > ${target_rootfs}/install/initial_solution.manifest
484 484
485 rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest 485 rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest
486 486