Skip to content

Commit

Permalink
Make deviceFamily fallback to deviceVariant.
Browse files Browse the repository at this point in the history
[ssu] Make deviceFamily fallback to deviceVariant. Contributes to JB#41312

Signed-off-by: Marko Saukko <marko.saukko@jolla.com>
  • Loading branch information
saukko committed Mar 9, 2018
1 parent 4dde8d2 commit 35abee9
Showing 1 changed file with 8 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

0 comments on commit 35abee9

Please sign in to comment.