Introduce OS_MIRROR_DL_PATH, distinct from OS_MIRROR_DIST_PATH
Change-Id: I387cf9c4492f22b44bc73c1e37f4eb0751bc1283 Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
@@ -89,6 +89,11 @@
|
||||
# "[repomgr]os_mirror_dist_path" from stx.conf; or 'debian/debian. This is currently
|
||||
# used in all build containers.
|
||||
#
|
||||
# OS_MIRROR_DL_PATH
|
||||
# StarlingX downloadables cache path within the OS mirror URL; defaults to the value of
|
||||
# "[repomgr]os_mirror_dl_path" from stx.conf; or 'debian. This is currently
|
||||
# used in all build containers.
|
||||
#
|
||||
# LAT_MIRROR_URL
|
||||
# StarlingX LAT mirror URL; defaults to the value of "[repomgr]lat_mirror_url" from
|
||||
# stx.conf; or 'https://mirror.starlingx.windriver.com/mirror/'. This is currently
|
||||
|
11
stx-init-env
11
stx-init-env
@@ -731,6 +731,7 @@ builder_os_codename=${STX_CONF["builder.os_codename"]}
|
||||
builder_os_arch=${STX_CONF["builder.os_arch"]}
|
||||
os_mirror_url=${STX_CONF["repomgr.os_mirror_url"]}
|
||||
os_mirror_dist_path=${STX_CONF["repomgr.os_mirror_dist_path"]}
|
||||
os_mirror_dl_path=${STX_CONF["repomgr.os_mirror_dl_path"]}
|
||||
lat_mirror_url=${STX_CONF["repomgr.lat_mirror_url"]}
|
||||
lat_mirror_lat_path=${STX_CONF["repomgr.lat_mirror_lat_path"]}
|
||||
|
||||
@@ -755,10 +756,18 @@ if [ -z "${os_mirror_dist_path}" ]; then
|
||||
if [ "${os_mirror_url}" == "http://" ]; then
|
||||
info "Missing stx.conf value for: repomgr.os_mirror_dist_path; mirror points to upstream: ${os_mirror_url}; allowing"
|
||||
else
|
||||
os_mirror_dist_path=debian/debian/
|
||||
os_mirror_dist_path=${builder_os_id}/${builder_os_id}/
|
||||
warn "Missing stx.conf value for: repomgr.os_mirror_dist_path; using: ${os_mirror_dist_path}"
|
||||
fi
|
||||
fi
|
||||
if [ -z "${os_mirror_dl_path}" ]; then
|
||||
if [ "${os_mirror_url}" == "http://" ]; then
|
||||
info "Missing stx.conf value for: repomgr.os_mirror_dl_path; mirror points to upstream: ${os_mirror_url}; allowing"
|
||||
else
|
||||
os_mirror_dl_path=${builder_os_id}/
|
||||
warn "Missing stx.conf value for: repomgr.os_mirror_dl_path; using: ${os_mirror_dist_path}"
|
||||
fi
|
||||
fi
|
||||
if [ -z "${lat_mirror_url}" ]; then
|
||||
lat_mirror_url=https://mirror.starlingx.windriver.com/mirror/
|
||||
warn "Missing stx.conf value for: repomgr.lat_mirror_url; using: ${lat_mirror_url}"
|
||||
|
@@ -46,6 +46,7 @@ lat_mirror_url = https://mirror.starlingx.windriver.com/mirror/
|
||||
origin = starlingx
|
||||
|
||||
os_mirror_dist_path = debian/debian/
|
||||
os_mirror_dl_path = debian/
|
||||
os_mirror_url = https://mirror.starlingx.windriver.com/mirror/
|
||||
sourceslist =
|
||||
stx_mirror_strategy = stx_mirror_first
|
||||
|
@@ -207,6 +207,7 @@ class STXConfigParser(object):
|
||||
# Upgrade os related mirror info
|
||||
self.__upgrade_nonempty_key('repomgr', 'os_mirror_url', stx_mirror_url)
|
||||
self.__set('repomgr', 'os_mirror_dist_path', 'debian/debian/')
|
||||
self.__set('repomgr', 'os_mirror_dl_path', 'debian/')
|
||||
self.__delete_key('repomgr', 'stx_mirror_url')
|
||||
|
||||
# Add LAT related mirror info, as this might be different than the
|
||||
@@ -214,6 +215,9 @@ class STXConfigParser(object):
|
||||
self.__set('repomgr', 'lat_mirror_url', stx_mirror_url)
|
||||
self.__set('repomgr', 'lat_mirror_lat_path', 'lat-sdk/')
|
||||
|
||||
if not self.cf.has_option('repomgr', 'os_mirror_dl_path'):
|
||||
self.__set('repomgr', 'os_mirror_dl_path', 'debian/')
|
||||
|
||||
# lat_mirror_lat_path was set incorrectly in some versions, fix it
|
||||
lat_mirror_lat_path = self.__get('repomgr', 'lat_mirror_lat_path', None)
|
||||
if lat_mirror_lat_path == 'lat-sdk/lat-sdk-20231206/':
|
||||
|
@@ -130,6 +130,7 @@ class HandleControlTask(object):
|
||||
# Fail on os_mirror_url without catching the error this time
|
||||
os_mirror_url = self.config.get('repomgr', 'os_mirror_url')
|
||||
os_mirror_dist_path = self.config.get('repomgr', 'os_mirror_dist_path')
|
||||
os_mirror_dl_path = self.config.get('repomgr', 'os_mirror_dl_path')
|
||||
stx_mirror_strategy = self.config.get('repomgr', 'stx_mirror_strategy')
|
||||
lat_mirror_url = self.config.get('repomgr', 'lat_mirror_url')
|
||||
lat_mirror_lat_path = self.config.get('repomgr', 'lat_mirror_lat_path')
|
||||
@@ -223,6 +224,7 @@ stx-pkgbuilder/configmap/')
|
||||
line = line.replace("@HOSTUSERNAME@", hostusername)
|
||||
line = line.replace("@OS_MIRROR_URL@", os_mirror_url)
|
||||
line = line.replace("@OS_MIRROR_DIST_PATH@", os_mirror_dist_path)
|
||||
line = line.replace("@OS_MIRROR_DL_PATH@", os_mirror_dl_path)
|
||||
line = line.replace("@LAT_MIRROR_URL@", lat_mirror_url)
|
||||
line = line.replace("@LAT_MIRROR_LAT_PATH@", lat_mirror_lat_path)
|
||||
line = line.replace("@STX_MIRROR_STRATEGY@", stx_mirror_strategy)
|
||||
|
@@ -40,6 +40,7 @@ export HOSTUSERNAME=@HOSTUSERNAME@
|
||||
|
||||
export OS_MIRROR_URL=@OS_MIRROR_URL@
|
||||
export OS_MIRROR_DIST_PATH=@OS_MIRROR_DIST_PATH@
|
||||
export OS_MIRROR_DL_PATH=@OS_MIRROR_DL_PATH@
|
||||
|
||||
# Included for completeness. No know uses of these so far.
|
||||
export LAT_MIRROR_URL=@LAT_MIRROR_URL@
|
||||
|
Reference in New Issue
Block a user