Merge "Work around yum/dnf differences"

This commit is contained in:
Jenkins 2015-07-17 23:44:43 +00:00 committed by Gerrit Code Review
commit 61914629f1
3 changed files with 27 additions and 6 deletions

View File

@ -25,5 +25,11 @@ else
exit 1
fi
if [ $DIB_RELEASE -ge 22 ]; then
mkdir -p /etc/dnf/vars
echo $basearch > /etc/dnf/vars/basearch
echo $arch > /etc/dnf/vars/basearch
else
echo $basearch > /etc/yum/vars/basearch
echo $arch > /etc/yum/vars/arch
fi

View File

@ -6,5 +6,11 @@ fi
set -eu
set -o pipefail
sed -i 's/keepcache=1/keepcache=0/' /etc/yum.conf
sed -i 's/cachedir=\/tmp\/yum/cachedir=\/var\/cache\/yum/' /etc/yum.conf
if [ $DIB_RELEASE -ge 22 ]; then
cfg=/etc/dnf/dnf.conf
else
cfg=/etc/yum.conf
fi
sed -i 's/keepcache=1/keepcache=0/' $cfg
sed -i 's/cachedir=\/tmp\/yum/cachedir=\/var\/cache\/yum/' $cfg

View File

@ -6,5 +6,14 @@ fi
set -eu
set -o pipefail
sed -i 's/keepcache=0/keepcache=1/' /etc/yum.conf
sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' /etc/yum.conf
if [ $DIB_RELEASE -ge 22 ]; then
# dnf is slightly different; doesn't have these by default
cfg=/etc/dnf/dnf.conf
echo "keepcache=1" >> $cfg
echo "cachedir=/tmp/yum" >> $cfg
else
cfg=/etc/yum.conf
sed -i 's/keepcache=0/keepcache=1/' $cfg
sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' $cfg
fi