Set and export DIB_RELEASE for centos7
The default value was set in the centos7 element, but not exported, which caused issues in rpm-distro. Also changed a test in rpm-distro to only check for DIB_RELEASE > 22 if it's fedora. Closes-Bug: #1477172 Change-Id: Ib6f4227411c2e8f1965c3b78bc318512c59a7876
This commit is contained in:
parent
2a0b32418b
commit
570ecf16a5
@ -1 +1,2 @@
|
|||||||
|
export DIB_RELEASE=GenericCloud
|
||||||
export DISTRO_NAME=centos7
|
export DISTRO_NAME=centos7
|
||||||
|
@ -25,7 +25,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $DIB_RELEASE -ge 22 ]; then
|
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
||||||
mkdir -p /etc/dnf/vars
|
mkdir -p /etc/dnf/vars
|
||||||
echo $basearch > /etc/dnf/vars/basearch
|
echo $basearch > /etc/dnf/vars/basearch
|
||||||
echo $arch > /etc/dnf/vars/basearch
|
echo $arch > /etc/dnf/vars/basearch
|
||||||
|
@ -6,7 +6,7 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [ $DIB_RELEASE -ge 22 ]; then
|
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
||||||
cfg=/etc/dnf/dnf.conf
|
cfg=/etc/dnf/dnf.conf
|
||||||
else
|
else
|
||||||
cfg=/etc/yum.conf
|
cfg=/etc/yum.conf
|
||||||
|
@ -6,7 +6,7 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
if [ $DIB_RELEASE -ge 22 ]; then
|
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
||||||
# dnf is slightly different; doesn't have these by default
|
# dnf is slightly different; doesn't have these by default
|
||||||
cfg=/etc/dnf/dnf.conf
|
cfg=/etc/dnf/dnf.conf
|
||||||
echo "keepcache=1" >> $cfg
|
echo "keepcache=1" >> $cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user