c4c21967d8
The python3/python3-pyyaml packages both are never installed and dnf itself never updated when $DIB_DISTRIBUTION_MIRROR set and used. This change fix the order of the operations: 1. yum/dnf configure. 2. *.repo patching. 3. yum/dnf update/install execution. Change-Id: Ifbbf1f0190fe8c8a77fb3be820e8056447e755f6 Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
19 lines
425 B
Bash
Executable file
19 lines
425 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [[ ${YUM} == "dnf" ]]; 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
|
|
|