Skip to content

Commit

Permalink
[ssudeviceinfo] Remove obsolete QtSystems dependency
Browse files Browse the repository at this point in the history
Our QtSystems depends on libssu now for the device model,
so we should not make QtSystems depend on libssu to avoid
infinite recursion.
  • Loading branch information
Thomas Perl committed Apr 15, 2014
1 parent 59e7b81 commit e63fb84
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 39 deletions.
9 changes: 1 addition & 8 deletions board-mappings.ini
Expand Up @@ -17,18 +17,13 @@
# - boardname.contains -- searches for substring in boardname
# NOTE: only use boardname if none of the other options match
# use the boardname command to set/check the current value
# - systeminfo.equals -- compares the model returned by QSystemInfo
# with the value provided
# NOTE: systeminfo matching is currently disabled, as this would
# pull in the whole X11 stack, and on Mer/Nemo does cpuinfo
# matching only anyway, which ssu can do better already.
# - cpuinfo.contains -- searches /proc/cpuinfo for a string
# - uname-release.contains -- searches the kernels release string for
# a string (uname -r)
# - arch.equals -- compares with zyppers arch (like i586)
#
# Resolve order is:
# file.exists -> systeminfo.equals -> cpuinfo.contains
# file.exists -> cpuinfo.contains
# -> uname-release.contains -> arch.equals
#
# The found model (after resolving variants) will be used as category. The
Expand Down Expand Up @@ -85,8 +80,6 @@
[file.exists]
SDK=/mer-sdk-chroot

[systeminfo.equals]

[cpuinfo.contains]
N900=Nokia RX-51 board
N950=Nokia RM-680 board
Expand Down
23 changes: 0 additions & 23 deletions libssu/ssudeviceinfo.cpp
Expand Up @@ -201,29 +201,6 @@ QString SsuDeviceInfo::deviceModel(){
}
if (!cachedModel.isEmpty()) return cachedModel;

// check if the QSystemInfo model is useful
//QSystemDeviceInfo devInfo;
// TODO Current Mer SystemDeviceInfo only returns cpuinfo stuff,
// which is what we can do with cpuinfo matching in a more
// flexible way, so there's not really any need to pull in the
// whole X11 stack just for this. Can be enabled once systeminfo
// is less insane
/*
QSystemDeviceInfoLinuxCommonPrivate devInfo;
QString model = devInfo.model();
boardMappings->beginGroup("systeminfo.equals");
keys = boardMappings->allKeys();
foreach (const QString &key, keys){
QString value = boardMappings->value(key).toString();
if (model == value){
cachedModel = key;
break;
}
}
boardMappings->endGroup();
if (!cachedModel.isEmpty()) return cachedModel;
*/

// check if the device can be identified by a string in /proc/cpuinfo
procCpuinfo.setFileName(Sandbox::map("/proc/cpuinfo"));
procCpuinfo.open(QIODevice::ReadOnly | QIODevice::Text);
Expand Down
2 changes: 0 additions & 2 deletions tests/ut_deviceinfo/testdata/board-mappings.ini
@@ -1,8 +1,6 @@
[file.exists]
SDK=/mer-sdk-chroot

[systeminfo.equals]

[cpuinfo.contains]
N900=Nokia RX-51 board
N950=Nokia RM-680 board
Expand Down
2 changes: 0 additions & 2 deletions tests/ut_rndssucli/testdata/board-mappings.ini
@@ -1,8 +1,6 @@
[file.exists]
SDK=/mer-sdk-chroot

[systeminfo.equals]

[cpuinfo.contains]
N900=Nokia RX-51 board
N950=Nokia RM-680 board
Expand Down
2 changes: 0 additions & 2 deletions tests/ut_ssuurlresolver/testdata/board-mappings.ini
@@ -1,8 +1,6 @@
[file.exists]
SDK=/mer-sdk-chroot

[systeminfo.equals]

[cpuinfo.contains]
N900=Nokia RX-51 board
N950=Nokia RM-680 board
Expand Down
2 changes: 0 additions & 2 deletions tests/ut_urlresolver/testdata/board-mappings.ini
@@ -1,8 +1,6 @@
[file.exists]
SDK=/mer-sdk-chroot

[systeminfo.equals]

[cpuinfo.contains]
N900=Nokia RX-51 board
N950=Nokia RM-680 board
Expand Down

0 comments on commit e63fb84

Please sign in to comment.