summaryrefslogtreecommitdiffstats
path: root/meta
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
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')
-rw-r--r--meta/classes/package_rpm.bbclass11
-rw-r--r--meta/classes/rootfs_ipk.bbclass2
-rw-r--r--meta/classes/rootfs_rpm.bbclass3
-rw-r--r--meta/conf/bitbake.conf2
4 files changed, 12 insertions, 6 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
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 1403422ca7..c9650cb6c7 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -21,8 +21,6 @@ OPKG_POSTPROCESS_COMMANDS = "ipk_insert_feed_uris; "
21 21
22OPKGLIBDIR = "${localstatedir}/lib" 22OPKGLIBDIR = "${localstatedir}/lib"
23 23
24# Which packages to not install on the basis of a recommendation
25BAD_RECOMMENDATIONS ?= ""
26MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg" 24MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg"
27 25
28fakeroot rootfs_ipk_do_rootfs () { 26fakeroot rootfs_ipk_do_rootfs () {
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 1b09c8d5ff..30b52d4da2 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -163,8 +163,7 @@ rpm_setup_smart_target_config() {
163 # Set up smart configuration for the target 163 # Set up smart configuration for the target
164 rm -rf ${IMAGE_ROOTFS}/var/lib/smart 164 rm -rf ${IMAGE_ROOTFS}/var/lib/smart
165 smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart channel --add rpmsys type=rpm-sys -y 165 smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart channel --add rpmsys type=rpm-sys -y
166 smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart config --set rpm-nolinktos=1 166 package_write_smart_config ${IMAGE_ROOTFS}
167 smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart config --set rpm-noparentdirs=1
168 rm -f ${IMAGE_ROOTFS}/var/lib/smart/config.old 167 rm -f ${IMAGE_ROOTFS}/var/lib/smart/config.old
169} 168}
170 169
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 62a3936744..07eb473190 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -753,6 +753,8 @@ COMBINED_FEATURES[vardeps] += "DISTRO_FEATURES MACHINE_FEATURES"
753SERIAL_CONSOLE ??= "" 753SERIAL_CONSOLE ??= ""
754SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE', True).replace(' ', ';')}" 754SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE', True).replace(' ', ';')}"
755 755
756BAD_RECOMMENDATIONS ?= ""
757
756# Make sure MACHINE isn't exported 758# Make sure MACHINE isn't exported
757# (breaks binutils at least) 759# (breaks binutils at least)
758MACHINE[unexport] = "1" 760MACHINE[unexport] = "1"