summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-07-24 17:26:08 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-29 13:09:15 +0100
commitf629afe1539c053cfdfb552f7623780567cc6b16 (patch)
tree8343bac8f0e4b51b99608de7f9271959b78cdcc6 /meta/classes/package_rpm.bbclass
parentface212d60b03c7a615c5b09fb6ca2e11de7c7d0 (diff)
downloadpoky-f629afe1539c053cfdfb552f7623780567cc6b16.tar.gz
classes/rootfs_rpm: implement BAD_RECOMMENDATIONS for RPM
Add support for the BAD_RECOMMENDATIONS variable that can be used to prevent specific packages from being installed via an RRECOMMENDS relationship when using the RPM backend. (Previously this functionality was only available when using ipk packaging.) In the process this moves the defaulting of BAD_RECOMMENDATIONS (as empty) to bitbake.conf since it is no longer specific to the ipk backend, as well as unifying some of the code that creates the configuration for smart for use on the host and target. Fixes [YOCTO #3916]. (From OE-Core rev: 4e85129a7d47baf3e32b815cbc277bff84e085a0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.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.bbclass11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 1537079bb0..324d83f751 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -224,6 +224,14 @@ translate_oe_to_smart() {
224 export pkgs_to_install 224 export pkgs_to_install
225} 225}
226 226
227package_write_smart_config() {
228 # Write common configuration for host and target usage
229 smart --data-dir=$1/var/lib/smart config --set rpm-nolinktos=1
230 smart --data-dir=$1/var/lib/smart config --set rpm-noparentdirs=1
231 for i in ${BAD_RECOMMENDATIONS}; do
232 smart --data-dir=$1/var/lib/smart flag --set ignore-recommends $i
233 done
234}
227 235
228# 236#
229# Install a bunch of packages using rpm. 237# Install a bunch of packages using rpm.
@@ -345,10 +353,9 @@ EOF
345 rm -rf ${target_rootfs}/var/lib/smart 353 rm -rf ${target_rootfs}/var/lib/smart
346 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-root=${target_rootfs} 354 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-root=${target_rootfs}
347 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-dbpath=${rpmlibdir} 355 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-dbpath=${rpmlibdir}
348 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-nolinktos=1
349 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-noparentdirs=1
350 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._var=${localstatedir} 356 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._var=${localstatedir}
351 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp 357 smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp
358 package_write_smart_config ${target_rootfs}
352 # Optional debugging 359 # Optional debugging
353 #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-level=debug 360 #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-level=debug
354 #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-file=/tmp/smart-debug-logfile 361 #smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-file=/tmp/smart-debug-logfile