Make sure dnf won't autoremove packages that we explicitly installed

As dnf 1.1.1 is pretty recent, make sure we update it as early as possible.

Change-Id: I30039090cfe652b864d847713ab2986c5659023d
This commit is contained in:
Dmitry Tantsur 2015-09-04 16:00:31 +02:00
parent bf4a60a9e3
commit b544e91494
2 changed files with 19 additions and 0 deletions

View File

@ -124,6 +124,13 @@ if [ -n "$WHITELIST" ]; then
${YUM} -v -y $ACTION $EXTRA_ARGS $PKGS ${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
# probably not the right place for this; but python-pip package on # probably not the right place for this; but python-pip package on
# fedora/rh calls pip "pip-python" while the rest of the work # fedora/rh calls pip "pip-python" while the rest of the work
# expects it to be just called "pip" # expects it to be just called "pip"

View 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