summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-07-24 17:26:08 +0100
committerSaul Wold <sgw@linux.intel.com>2013-07-27 23:28:29 -0700
commit4e85129a7d47baf3e32b815cbc277bff84e085a0 (patch)
tree61dd3c16f1461eab026f8eba541d7613c2be7b5a /meta/classes
parentaea9d379ea217c78b64a81853ec3744188158008 (diff)
downloadopenembedded-core-4e85129a7d47baf3e32b815cbc277bff84e085a0.tar.gz
openembedded-core-4e85129a7d47baf3e32b815cbc277bff84e085a0.tar.bz2
openembedded-core-4e85129a7d47baf3e32b815cbc277bff84e085a0.zip
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_rpm.bbclass11
-rw-r--r--meta/classes/rootfs_ipk.bbclass2
-rw-r--r--meta/classes/rootfs_rpm.bbclass3
3 files changed, 10 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() {
export pkgs_to_install
}
+package_write_smart_config() {
+ # Write common configuration for host and target usage
+ smart --data-dir=$1/var/lib/smart config --set rpm-nolinktos=1
+ smart --data-dir=$1/var/lib/smart config --set rpm-noparentdirs=1
+ for i in ${BAD_RECOMMENDATIONS}; do
+ smart --data-dir=$1/var/lib/smart flag --set ignore-recommends $i
+ done
+}
#
# Install a bunch of packages using rpm.
@@ -345,10 +353,9 @@ EOF
rm -rf ${target_rootfs}/var/lib/smart
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-root=${target_rootfs}
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-dbpath=${rpmlibdir}
- smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-nolinktos=1
- smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-noparentdirs=1
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._var=${localstatedir}
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp
+ package_write_smart_config ${target_rootfs}
# Optional debugging
#smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-log-level=debug
#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; "
OPKGLIBDIR = "${localstatedir}/lib"
-# Which packages to not install on the basis of a recommendation
-BAD_RECOMMENDATIONS ?= ""
MULTILIBRE_ALLOW_REP = "${OPKGLIBDIR}/opkg"
fakeroot 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() {
# Set up smart configuration for the target
rm -rf ${IMAGE_ROOTFS}/var/lib/smart
smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart channel --add rpmsys type=rpm-sys -y
- smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart config --set rpm-nolinktos=1
- smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart config --set rpm-noparentdirs=1
+ package_write_smart_config ${IMAGE_ROOTFS}
rm -f ${IMAGE_ROOTFS}/var/lib/smart/config.old
}