Fix download of lower layer rpms
A recent change to centralize the conversion of URL to CENGN mirror URL was converting some URL's incorrectly. It should not convert a URL that is already a CENGN url. Closes-bug: 2029499 Signed-off-by: Scott Little <scott.little@windriver.com> Change-Id: I7c94d5542c26e83b8a08d8f72d007dff971322ee
This commit is contained in:
parent
2b2379dc4f
commit
5e8992d86f
|
@ -239,6 +239,12 @@ CENGN_HOST="mirror.starlingx.cengn.ca"
|
|||
CENGN_PORT="80"
|
||||
CENGN_URL_ROOT="mirror"
|
||||
|
||||
to_regex () {
|
||||
# Currently only care about one case
|
||||
# convert '.' to '[.]'
|
||||
echo $1 | sed 's#[.]#[.]#g'
|
||||
}
|
||||
|
||||
url_to_stx_mirror_url () {
|
||||
local URL="$1"
|
||||
local DISTRO="$2"
|
||||
|
@ -250,6 +256,11 @@ url_to_stx_mirror_url () {
|
|||
return 1
|
||||
fi
|
||||
|
||||
if [[ ${URL} =~ $(to_regex ${CENGN_HOST}) ]]; then
|
||||
echo "${URL}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
FS_PATH="$(repo_url_to_sub_path "$URL")"
|
||||
if [ $? -ne 0 ]; then
|
||||
>&2 echo "Error: $FUNCNAME (${LINENO}): repo_url_to_sub_path '$URL'"
|
||||
|
|
Loading…
Reference in New Issue