diff --git a/0002-fix-blank-of-youker-assistant-3.1.4.21.patch b/0002-fix-blank-of-youker-assistant-3.1.4.21.patch new file mode 100644 index 0000000000000000000000000000000000000000..afc646821f2204b90cc94a374bd3cbbfe79ecb89 --- /dev/null +++ b/0002-fix-blank-of-youker-assistant-3.1.4.21.patch @@ -0,0 +1,67 @@ +From 8379ce41009010b3c10077a80cda2bb7dda44f0a Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Mon, 24 Jun 2024 19:47:43 +0800 +Subject: [PATCH] fix blank of youker-assistant 3.1.4.21 + +--- + commonfunc/utils.cpp | 6 +++--- + .../conf/com.kylin.assistant.systemdaemon.service | 2 +- + kyasDbus/systemdaemon/kacmdtool.py | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/commonfunc/utils.cpp b/commonfunc/utils.cpp +index 911f56b..a0d3fa0 100644 +--- a/commonfunc/utils.cpp ++++ b/commonfunc/utils.cpp +@@ -64,15 +64,15 @@ QString getKAVersion() + QString versionText; + QProcess proc; + QStringList options; +- options << "-l" << "|" << "grep" << "youker-assistant"; +- proc.start("dpkg", options); ++ options << "-l" << "youker-assistant"; ++ proc.start("rpm", options); + proc.waitForFinished(); + QString dpkgInfo = proc.readAll(); + QStringList infoList = dpkgInfo.split("\n"); + for (int n = 0; n < infoList.size(); n++) { + QString strInfoLine = infoList[n]; + if (strInfoLine.contains("youker-assistant")) { +- QStringList lineInfoList = strInfoLine.split(QRegExp("[\\s]+")); ++ QStringList lineInfoList = strInfoLine.split(QRegExp("-")); + if (lineInfoList.size() >= 3) { + versionText = lineInfoList[2]; + } +diff --git a/kyasDbus/systemdaemon/conf/com.kylin.assistant.systemdaemon.service b/kyasDbus/systemdaemon/conf/com.kylin.assistant.systemdaemon.service +index 7dc6fc8..5e9bf73 100644 +--- a/kyasDbus/systemdaemon/conf/com.kylin.assistant.systemdaemon.service ++++ b/kyasDbus/systemdaemon/conf/com.kylin.assistant.systemdaemon.service +@@ -1,4 +1,4 @@ + [D-BUS Service] + Name=com.kylin.assistant.systemdaemon +-Exec=/usr/bin/kylin-assistant-systemdaemon.py ++Exec=/usr/bin/python3 /usr/bin/kylin-assistant-systemdaemon.py + User=root +diff --git a/kyasDbus/systemdaemon/kacmdtool.py b/kyasDbus/systemdaemon/kacmdtool.py +index 74cfe3d..c567f67 100644 +--- a/kyasDbus/systemdaemon/kacmdtool.py ++++ b/kyasDbus/systemdaemon/kacmdtool.py +@@ -403,7 +403,7 @@ class KACmdTool(): + if not forceLoad and len(self.lshwSystemList) > 0 : + return + +- args = ["lshw"] ++ args = ["/usr/sbin/lshw"] + pipe = subprocess.Popen(args, env={'LANGUAGE':'en:'}, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = pipe.stdout.readlines() + +@@ -946,4 +946,4 @@ if __name__ == "__main__": + # if "dev_name" in mapInfo and "Device File" in diskList["list"][i] \ + # and mapInfo["dev_name"] in diskList["list"][i]["Device File"] : + # diskList["list"][i].update(mapInfo) +- # pprint(diskList) +\ No newline at end of file ++ # pprint(diskList) +-- +2.25.1 + diff --git a/youker-assistant.spec b/youker-assistant.spec index ddb1a837ad8a2dc2b617c1dfc793a32377fc45fa..1c84b1a1e009d0ba82f74cf0e21167a5b135814f 100644 --- a/youker-assistant.spec +++ b/youker-assistant.spec @@ -1,12 +1,13 @@ Name: youker-assistant Version: 3.1.4.21 -Release: 1 +Release: 2 Summary: youker-assistant License: GPL-2+ and GPL-3 URL: https://github.com/UbuntuKylin/youker-assistant Source0: %{name}-%{version}.tar.gz Patch01: 0001-fix-compile-error-of-youker-assistant-3.1.4.21.patch +Patch02: 0002-fix-blank-of-youker-assistant-3.1.4.21.patch BuildRequires: qt5-qtcharts qt5-qtcharts-devel BuildRequires: qt5-qtbase-devel @@ -30,7 +31,7 @@ BuildRequires: libkysdk-sysinfo-devel Requires: python3-dbus python3-psutil python3-lxml python3-pillow python3-i2c-tools python3-pyxdg -Requires: util-linux hdparm lm_sensors xorg-x11-utils dmidecode cpufrequtils pciutils hwinfo smartmontools net-tools bluez +Requires: util-linux hdparm lm_sensors dmidecode cpufrequtils pciutils hwinfo smartmontools net-tools bluez %description Integrated tool to aid in routine system maintenance tasks @@ -93,6 +94,12 @@ unlink /usr/bin/kylin-assistant-sessiondaemon.py %changelog +* Fri Aug 22 2025 peijiankang - 3.1.4.21-2 +- Type: update +- ID: NA +- SUG: NA +- DESC: add 0002-fix-blank-of-youker-assistant-3.1.4.21.patch + * Tue Aug 19 2025 peijiankang - 3.1.4.21-1 - Type: update - ID: NA