Reapply "Make sure dnf won't autoremove packages that we explicitly installed"
The revert of this caused CI failures for Ironic in the
Ironic-Python-Agent builds.
This reverts commit 4f2613d815
.
Change-Id: I0963d3decefb62680f720bdc3dddd19ecb3bdfd4
This commit is contained in:
parent
fd8fae299e
commit
e661a18c51
@ -135,6 +135,13 @@ if [ -n "$WHITELIST" ]; then
|
||||
# [1] https://bugzilla.redhat.com/show_bug.cgi?id=965567
|
||||
set -o xtrace
|
||||
${YUM} -v -y $ACTION $EXTRA_ARGS $PKGS
|
||||
|
||||
if [ "$ACTION" == "install" ]; then
|
||||
if [ ${YUM} == "dnf" ]; then
|
||||
# Make sure dnf won't autoremove these packages
|
||||
dnf mark install $PKGS
|
||||
fi
|
||||
fi
|
||||
$_xtrace
|
||||
|
||||
# probably not the right place for this; but python-pip package on
|
||||
|
12
diskimage_builder/elements/yum/pre-install.d/00-dnf-update
Executable file
12
diskimage_builder/elements/yum/pre-install.d/00-dnf-update
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -eq 22 ]]; then
|
||||
# we need dnf mark command from dnf 1.1.1, which is pretty recent
|
||||
dnf --refresh update -y dnf
|
||||
fi
|
Loading…
Reference in New Issue
Block a user