Merge "Fix download of lower layer rpms" into r/stx.7.0
This commit is contained in:
commit
55730641a2
|
@ -239,6 +239,12 @@ CENGN_HOST="mirror.starlingx.cengn.ca"
|
||||||
CENGN_PORT="80"
|
CENGN_PORT="80"
|
||||||
CENGN_URL_ROOT="mirror"
|
CENGN_URL_ROOT="mirror"
|
||||||
|
|
||||||
|
to_regex () {
|
||||||
|
# Currently only care about one case
|
||||||
|
# convert '.' to '[.]'
|
||||||
|
echo $1 | sed 's#[.]#[.]#g'
|
||||||
|
}
|
||||||
|
|
||||||
url_to_stx_mirror_url () {
|
url_to_stx_mirror_url () {
|
||||||
local URL="$1"
|
local URL="$1"
|
||||||
local DISTRO="$2"
|
local DISTRO="$2"
|
||||||
|
@ -250,6 +256,11 @@ url_to_stx_mirror_url () {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${URL} =~ $(to_regex ${CENGN_HOST}) ]]; then
|
||||||
|
echo "${URL}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
FS_PATH="$(repo_url_to_sub_path "$URL")"
|
FS_PATH="$(repo_url_to_sub_path "$URL")"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
>&2 echo "Error: $FUNCNAME (${LINENO}): repo_url_to_sub_path '$URL'"
|
>&2 echo "Error: $FUNCNAME (${LINENO}): repo_url_to_sub_path '$URL'"
|
||||||
|
|
Loading…
Reference in New Issue