From 11104a5b3c5f8d3f1418a093008a8d98206cef76 Mon Sep 17 00:00:00 2001 From: Pami Ketolainen Date: Sat, 9 Mar 2024 17:40:25 +0200 Subject: [PATCH] [ssu] Add major/minor release in repoVariables. JB#61468 Allows using %(releaseMinor) in repo URLs in order to have repository independent of the "bugfix" releases. --- libssu/ssurepomanager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libssu/ssurepomanager.cpp b/libssu/ssurepomanager.cpp index e2d9328..0a5c815 100644 --- a/libssu/ssurepomanager.cpp +++ b/libssu/ssurepomanager.cpp @@ -378,6 +378,7 @@ QStringList SsuRepoManager::repoVariables(QHash *storageHash, SsuCoreConfig *settings = SsuCoreConfig::instance(); QStringList configSections; SsuSettings repoSettings(SSU_REPO_CONFIGURATION, SSU_REPO_CONFIGURATION_DIR); + QString release = settings->release(rnd); // fill in all arbitrary repo specific variables from ssu.ini var.variableSection(settings, "repository-url-variables", storageHash); @@ -406,7 +407,9 @@ QStringList SsuRepoManager::repoVariables(QHash *storageHash, configSections << "release" << "all"; } - storageHash->insert("release", settings->release(rnd)); + storageHash->insert("release", release); + storageHash->insert("releaseMajor", release.section('.', 0, 0)); + storageHash->insert("releaseMinor", release.section('.', 0, 1)); if (!storageHash->contains("debugSplit")) storageHash->insert("debugSplit", "packages");