Open stefanotorresi opened 2 years ago
Something is super-off in the rolling RPM package: the spec has the field Version: 1.38.1
while _service
file sets it to rolling+git.dev4.1633075099.6cfd959
. The problem is that we shouldn't use the rolling
tag there, but the latest stable version as a base. That is: I would expect the rolling package to still be versioned 0.4.0+git.dev4.1633075099.6cfd959
(which would tell it is a development version on top of 0.4.0)
The set_version
source service is incorrectly picking the sass-1.38.1.tgz
file as the source of the version. Go figure!
The package versioning is now fixed, but the repo priorities still need some work.
@stefanotorresi @rtorrero it could be as simple as this
diff --git a/install-agent.sh b/install-agent.sh
index 6a7338a..0fc0f52 100755
--- a/install-agent.sh
+++ b/install-agent.sh
@@ -187,9 +187,11 @@ function install_trento_rpm() {
if [[ -n "$USE_ROLLING" ]] ; then
TRENTO_REPO=${TRENTO_REPO:-"https://download.opensuse.org/repositories/devel:/sap:/trento:/factory/15.3/devel:sap:trento:factory.repo"}
TRENTO_REPO_KEY=${TRENTO_REPO_KEY:-"https://download.opensuse.org/repositories/devel:/sap:/trento:/factory/15.3/repodata/repomd.xml.key"}
+ TRENTO_REPO_PRIO=1
else
TRENTO_REPO=${TRENTO_REPO:-"https://download.opensuse.org/repositories/devel:/sap:/trento/15.3/devel:sap:trento.repo"}
TRENTO_REPO_KEY=${TRENTO_REPO_KEY:-"https://download.opensuse.org/repositories/devel:/sap:/trento/15.3/repodata/repomd.xml.key"}
+ TRENTO_REPO_PRIO=2
fi
rpm --import "${TRENTO_REPO_KEY}" >/dev/null
@@ -199,6 +201,7 @@ function install_trento_rpm() {
else
echo "* Adding Trento repository: $path."
zypper ar "$TRENTO_REPO" >/dev/null
+ zypper mr -p "$TRENTO_REPO_PRIO" "$TRENTO_REPO" >/dev/null
fi
zypper ref >/dev/null
if which trento >/dev/null 2>&1; then
Diego just spotted an edge case where he did install the stable version of the agent RPM initially, then wanted to switch to the rolling version, and the installer would not install the most recent version. Apparently, the problem might be caused by the version pattern: RPM doesn't see the rolling one as higher version than the old one.