From 35abee9cbbad1f6856047a367463c6a5d9b9d79c Mon Sep 17 00:00:00 2001 From: Marko Saukko Date: Fri, 9 Mar 2018 01:48:34 -0500 Subject: [PATCH] Make deviceFamily fallback to deviceVariant. [ssu] Make deviceFamily fallback to deviceVariant. Contributes to JB#41312 Signed-off-by: Marko Saukko --- libssu/ssudeviceinfo.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libssu/ssudeviceinfo.cpp b/libssu/ssudeviceinfo.cpp index a02b182..7f27cfd 100644 --- a/libssu/ssudeviceinfo.cpp +++ b/libssu/ssudeviceinfo.cpp @@ -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; }