Skip to content

Commit

Permalink
Update the bootstrap script to work with final onedir releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgreenaway authored and s0undt3ch committed Sep 11, 2022
1 parent 84d7208 commit 88a915b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,10 @@ elif [ "$ITYPE" = "onedir" ]; then
if [ "$(echo "$1" | grep -E '^(latest)$')" != "" ]; then
ONEDIR_REV="$1"
shift
elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)$')" != "" ]; then
elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}?-[0-9]$)')" != "" ]; then
# Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix
ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/')
ONEDIR_REV="minor/$ONEDIR_REV"
#ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/')
ONEDIR_REV="minor/$1"
shift
else
echo "Unknown stable version: $1 (valid: 3005, latest.)"
Expand All @@ -669,7 +669,7 @@ elif [ "$ITYPE" = "onedir_rc" ]; then
ONEDIR_REV="minor/$1"
shift
else
echo "Unknown stable version: $1 (valid: 3005, latest.)"
echo "Unknown stable version: $1 (valid: 3005-1, latest.)"
exit 1
fi
fi
Expand Down Expand Up @@ -4491,7 +4491,7 @@ enabled=1
enabled_metadata=1
_eof

fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/"
fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${ONEDIR_REV}/"
for key in $gpg_key; do
__rpm_import_gpg "${fetch_url}${key}" || return 1
done
Expand Down

0 comments on commit 88a915b

Please sign in to comment.