mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 00:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
face212d60
commit
f629afe153
@@ -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
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -753,6 +753,8 @@ COMBINED_FEATURES[vardeps] += "DISTRO_FEATURES MACHINE_FEATURES"
|
||||
SERIAL_CONSOLE ??= ""
|
||||
SERIAL_CONSOLES ??= "${@d.getVar('SERIAL_CONSOLE', True).replace(' ', ';')}"
|
||||
|
||||
BAD_RECOMMENDATIONS ?= ""
|
||||
|
||||
# Make sure MACHINE isn't exported
|
||||
# (breaks binutils at least)
|
||||
MACHINE[unexport] = "1"
|
||||
|
||||
Reference in New Issue
Block a user