Commit b1410bd7 authored by Aard's avatar Aard

Allow user URLs in ssu.ini, overriding URLs from repos.ini

parent cdad8ada
......@@ -224,14 +224,18 @@ QString Ssu::repoUrl(QString repoName, bool rndRepo, QHash<QString, QString> rep
repoParameters.insert("adaptation", settings->value("adaptation").toString());
repoParameters.insert("deviceFamily", deviceFamily());
foreach (const QString &section, configSections){
repoSettings->beginGroup(section);
if (repoSettings->contains(repoName)){
r = repoSettings->value(repoName).toString();
if (settings->contains("repository-urls/" + repoName))
r = settings->value("repository-urls/" + repoName).toString();
else {
foreach (const QString &section, configSections){
repoSettings->beginGroup(section);
if (repoSettings->contains(repoName)){
r = repoSettings->value(repoName).toString();
repoSettings->endGroup();
break;
}
repoSettings->endGroup();
break;
}
repoSettings->endGroup();
}
QHashIterator<QString, QString> i(repoParameters);
......
......@@ -9,3 +9,9 @@ ca-certificate=
credentials-url=https://example.com/ssu/device/%1/credentials.xml
register-url=https://example.com/ssu/device/%1/register.xml
credentials-scope=example
[repository-urls]
sample-url=http://example.com/repository/%(example)/
[repository-url-variables]
example=bunny
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment