From 1970ab5ab5355195377758ea541bcd47e7192add Mon Sep 17 00:00:00 2001 From: peijiankang Date: Mon, 30 May 2022 13:33:36 +0800 Subject: [PATCH] modify version of youker-assistant is null --- ...-version-of-youker-assistant-is-null.patch | 35 +++++++++++++++++++ youker-assistant.spec | 7 +++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 0002-modify-version-of-youker-assistant-is-null.patch diff --git a/0002-modify-version-of-youker-assistant-is-null.patch b/0002-modify-version-of-youker-assistant-is-null.patch new file mode 100644 index 0000000..ee04d9b --- /dev/null +++ b/0002-modify-version-of-youker-assistant-is-null.patch @@ -0,0 +1,35 @@ +From a755f802c3b65ac7b88c129ca64b112a7225b8b7 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Mon, 30 May 2022 10:57:43 +0800 +Subject: [PATCH] modify version of youker-assistant is null + +--- + commonfunc/utils.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/commonfunc/utils.cpp b/commonfunc/utils.cpp +index 911f56b..21061a4 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 << "-qa" << "|" << "grep" << "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]; + } +-- +2.33.0 + diff --git a/youker-assistant.spec b/youker-assistant.spec index 3dcab6c..e38fc3a 100644 --- a/youker-assistant.spec +++ b/youker-assistant.spec @@ -1,12 +1,13 @@ %define debug_package %{nil} Name: youker-assistant Version: 3.0.3 -Release: 3 +Release: 4 Summary: youker-assistant License: GPL-2+ and GPL-3 URL: https://github.com/UbuntuKylin/youker-assistant Source0: %{name}-%{version}.tar.gz Patch01: 0001-Fix-the-problem-that-the-contents-of-youker-assistan.patch +Patch02: 0002-modify-version-of-youker-assistant-is-null.patch BuildRequires: python3-devel python3-lxml python3-dbus python3-pyxdg BuildRequires: qt5-qtcharts qt5-qtcharts-devel @@ -39,6 +40,7 @@ user experience. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build export PATH=%{_qt5_bindir}:$PATH @@ -67,6 +69,9 @@ popd %{_datadir}/polkit-1/actions/com.kylin.assistant.systemdaemon.policy %changelog +* Mon May 30 2022 peijiankang - 3.0.3-4 +- modify version of youker-assistant is null + * Mon May 30 2022 peijiankang - 3.0.3-3 - Fix the problem that the contents of youker-assistant are not displayed