This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/22376 )
Change subject: repo-install-test: resolve distro obs dir in func
......................................................................
repo-install-test: resolve distro obs dir in func
Instead of hardcoding CentOS_8 in the centos code path, and Debian_9.0
in the debian code path, resolve the proper OBS directory based on
$DISTRO.
Related: OS#4969
Change-Id: Ie537e8befeebd7958b2a1fe8f6fd54587cfcb1b6
---
M scripts/repo-install-test/run-inside-docker.sh
1 file changed, 20 insertions(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, approved; Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
diff --git a/scripts/repo-install-test/run-inside-docker.sh b/scripts/repo-install-test/run-inside-docker.sh
index 2e9d6a8..355b668 100755
--- a/scripts/repo-install-test/run-inside-docker.sh
+++ b/scripts/repo-install-test/run-inside-docker.sh
@@ -37,6 +37,23 @@
osmo-bts-virtual
"
+distro_obsdir() {
+ case "$DISTRO" in
+ centos8)
+ echo "CentOS_8"
+ ;;
+ debian)
+ echo "Debian_9.0"
+ ;;
+ *)
+ echo "ERROR: unknown obsdir for '$DISTRO'." >&2
+ exit 1
+ ;;
+ esac
+}
+
+DISTRO_OBSDIR="$(distro_obsdir)"
+
# $1: OBS project (e.g. "network:osmocom:nightly" -> "network:/osmocom:/nightly")
proj_with_slashes() {
echo "$1" | sed "s.:.:/.g"
@@ -82,7 +99,7 @@
# $1: OBS project (e.g. "network:osmocom:nightly")
configure_osmocom_repo_debian() {
local proj="$1"
- local obs_repo="download.opensuse.org/repositories/$(proj_with_slashes "$proj")/Debian_9.0/"
+ local obs_repo="download.opensuse.org/repositories/$(proj_with_slashes "$proj")/$DISTRO_OBSDIR/"
local release_key="/var/cache/apt/${proj}_Release.key"
echo "Configuring Osmocom repository"
@@ -107,7 +124,7 @@
# $1: OBS project (e.g. "network:osmocom:nightly")
configure_osmocom_repo_centos() {
local proj="$1"
- local baseurl="https://download.opensuse.org/repositories/$(proj_with_slashes "$proj")/CentOS_8"
+ local baseurl="https://download.opensuse.org/repositories/$(proj_with_slashes "$proj")/$DISTRO_OBSDIR"
echo "Configuring Osmocom repository"
# Generate this file, based on the feed:
@@ -256,7 +273,7 @@
}
install_repo_packages_debian() {
- local obs="obs://build.opensuse.org/$PROJ/Debian_9.0"
+ local obs="obs://build.opensuse.org/$PROJ/$DISTRO_OBSDIR"
echo "Installing all repository packages"
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/22376
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ie537e8befeebd7958b2a1fe8f6fd54587cfcb1b6
Gerrit-Change-Number: 22376
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210125/f93f688e/attachment.htm>