Merge "Work around yum/dnf differences"
This commit is contained in:
commit
61914629f1
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user