solid 5.39.0-1 (i586;x86_64) 2017-3266
-9999

Status rejected
Submitter tpgxyz [@T] gmail.com
Platform 3.0
Repository main
URL https://abf.openmandriva.org/build_lists/126363
Packages
libKF5Solid5-5.39.0-1.i586.binary
libKF5Solid-devel-5.39.0-1.i586.binary
solid-5.39.0-1.i586.source
solid-5.39.0-1.i586.binary
lib64KF5Solid5-5.39.0-1.x86_64.binary
lib64KF5Solid-devel-5.39.0-1.x86_64.binary
solid-5.39.0-1.x86_64.source
solid-5.39.0-1.x86_64.binary
Build Date 2017-11-03 17:39:33 +0000 UTC
Last Updated 2017-11-07 17:23:40.523473242 +0000 UTC
$ git diff --patch-with-stat --summary 928f140f80f55e941ab78788081bdafaac9e7171..7b9e6e3c6a857a90fdf79e36316837190aa78425

 .abf.yml         |  2 +-
 solid.spec       |  5 ++++-
 sort_cores.patch | 39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 sort_cores.patch

diff --git a/.abf.yml b/.abf.yml
index 7cd2458..dd75c80 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
 sources:
-  solid-5.38.0.tar.xz: 94c859f0fa36214b52f932b1a846391da433f7e3
+  solid-5.39.0.tar.xz: e440cfeef7375422644801578fa829c8aac04dc2
diff --git a/solid.spec b/solid.spec
index 89134a0..b747fdd 100644
--- a/solid.spec
+++ b/solid.spec
@@ -5,13 +5,15 @@
 %define stable %([ "`echo %{version} |cut -d. -f3`" -ge 80 ] && echo -n un; echo -n stable)
 
 Name: solid
-Version:	5.38.0
+Version:	5.39.0
 Release:	1
 Source0: http://download.kde.org/%{stable}/frameworks/%(echo %{version} |cut -d. -f1-2)/%{name}-%{version}.tar.xz
 Summary: The KDE Frameworks 5 hardware access library
 URL: http://kde.org/
 License: GPL
 Group: System/Libraries
+# (tpg) sort cores
+Patch0: sort_cores.patch
 BuildRequires: cmake(ECM)
 BuildRequires: media-player-info
 BuildRequires: pkgconfig(Qt5Core)
@@ -48,6 +50,7 @@ Development files (Headers etc.) for %{name}.
 
 %prep
 %setup -q
+%apply_patches
 %cmake_kde5
 
 %build
diff --git a/sort_cores.patch b/sort_cores.patch
new file mode 100644
index 0000000..7a67ee1
--- /dev/null
+++ b/sort_cores.patch
@@ -0,0 +1,39 @@
+--- solid-5.21.0.old/src/solid/devices/frontend/devicemanager_p.h	2016-04-04 00:08:10.000000000 +0300
++++ solid-5.21.0.new/src/solid/devices/frontend/devicemanager_p.h	2016-04-15 04:02:42.751456230 +0300
+@@ -29,6 +29,7 @@
+ #include <QtCore/QPointer>
+ #include <QtCore/QSharedData>
+ #include <QtCore/QThreadStorage>
++#include <QtCore/QRegularExpression>
+ 
+ namespace Solid
+ {
+--- solid-5.21.0.old/src/solid/devices/frontend/devicemanager.cpp	2016-04-04 00:08:10.000000000 +0300
++++ solid-5.21.0.new/src/solid/devices/frontend/devicemanager.cpp	2016-04-15 03:51:35.213357947 +0300
+@@ -114,8 +114,24 @@
+ 
+         QStringList udis = backend->devicesFromQuery(parentUdi, type);
+ 
+-        Q_FOREACH (const QString &udi, udis) {
+-            list.append(Device(udi));
++        if(type==DeviceInterface::Type::Processor) {
++            QMap<int, QString> coresMap;
++            QRegularExpression re("cpu([0-9]+)");
++            Q_FOREACH (const QString &udi, udis) {
++                QRegularExpressionMatch match = re.match(udi);
++                if(match.hasMatch()) {
++                     QString matched = match.captured(1);
++                     coresMap[matched.toUInt()] = udi;
++                }
++            }
++            for(QMap<int, QString>::const_iterator ii=coresMap.constBegin(); ii != coresMap.constEnd(); ii++) {
++                list.append(Device(ii.value()));
++            }
++        }
++        else  {
++            Q_FOREACH (const QString &udi, udis) {
++                list.append(Device(udi));
++            }
+         }
+     }
+ 
Not Available

itchka [@T] compuserve.comAlready published2578d 05hrs
itchka [@T] compuserve.comNo Comment.2578d 05hrs