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:
Abel Lopez 2015-07-23 12:26:53 -07:00
parent 2a0b32418b
commit 570ecf16a5
4 changed files with 4 additions and 3 deletions

View File

@ -1 +1,2 @@
export DIB_RELEASE=GenericCloud
export DISTRO_NAME=centos7

View File

@ -25,7 +25,7 @@ else
exit 1
fi
if [ $DIB_RELEASE -ge 22 ]; then
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
mkdir -p /etc/dnf/vars
echo $basearch > /etc/dnf/vars/basearch
echo $arch > /etc/dnf/vars/basearch

View File

@ -6,7 +6,7 @@ fi
set -eu
set -o pipefail
if [ $DIB_RELEASE -ge 22 ]; then
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
cfg=/etc/dnf/dnf.conf
else
cfg=/etc/yum.conf

View File

@ -6,7 +6,7 @@ fi
set -eu
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
cfg=/etc/dnf/dnf.conf
echo "keepcache=1" >> $cfg