Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb41312' into 'master'
Jb41312

See merge request !18
  • Loading branch information
saukko committed Mar 11, 2018
2 parents 2bd0af0 + 35abee9 commit 236af59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions libssu/ssudeviceinfo.cpp
Expand Up @@ -136,10 +136,15 @@ QString SsuDeviceInfo::deviceFamily()

QString model = deviceVariant(true);

cachedFamily = "UNKNOWN";

if (boardMappings->contains(model + "/family"))
if (boardMappings->contains(model + "/family")) {
cachedFamily = boardMappings->value(model + "/family").toString();
} else {
// In case family is not defined, lets use device variant, which
// falls back to device model. This way we can use the deviceFamily
// in common repository names where we want to have same feature package
// for multiple devices some of which have family and some which do not.
cachedFamily = model;
}

return cachedFamily;
}
Expand Down
1 change: 1 addition & 0 deletions libssu/ssurepomanager.cpp
Expand Up @@ -407,6 +407,7 @@ QString SsuRepoManager::url(const QString &repoName, bool rndRepo,

repoParameters.insert("deviceFamily", deviceInfo.deviceFamily());
repoParameters.insert("deviceModel", deviceInfo.deviceModel());
repoParameters.insert("deviceVariant", deviceInfo.deviceVariant(true));

QString adaptationRepoName = deviceInfo.adaptationVariables(repoName, &repoParameters);

Expand Down

0 comments on commit 236af59

Please sign in to comment.