modify version is pull
This commit is contained in:
parent
527c45b82d
commit
4fd47e66da
43
0001-modify-version-is-pull.patch
Normal file
43
0001-modify-version-is-pull.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
From be119641ce721595df071aa33d631784fd28b504 Mon Sep 17 00:00:00 2001
|
||||||
|
From: pei-jiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Thu, 7 Apr 2022 10:03:06 +0800
|
||||||
|
Subject: [PATCH] modify version is pull
|
||||||
|
|
||||||
|
---
|
||||||
|
src/util.cpp | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/util.cpp b/src/util.cpp
|
||||||
|
index c5aa3aa..951ffa6 100644
|
||||||
|
--- a/src/util.cpp
|
||||||
|
+++ b/src/util.cpp
|
||||||
|
@@ -499,20 +499,20 @@ QString getUsmVersion()
|
||||||
|
QString versionText;
|
||||||
|
QProcess proc;
|
||||||
|
QStringList options;
|
||||||
|
- options << "-l" << "|" << "grep" << "ukui-system-monitor";
|
||||||
|
- proc.start("dpkg", options);
|
||||||
|
+ options << "-qa" << "|" << "grep" << "ukui-system-monitor";
|
||||||
|
+ 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("ukui-system-monitor")) {
|
||||||
|
- QStringList lineInfoList = strInfoLine.split(QRegExp("[\\s]+"));
|
||||||
|
+ QStringList lineInfoList = strInfoLine.split(QRegExp("-"));
|
||||||
|
if (lineInfoList.size() >= 3) {
|
||||||
|
- versionText = lineInfoList[2];
|
||||||
|
+ versionText = lineInfoList[3];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return versionText;
|
||||||
|
-}
|
||||||
|
\ No newline at end of file
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,11 +1,12 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
Name: ukui-system-monitor
|
Name: ukui-system-monitor
|
||||||
Version: 2.0.10
|
Version: 2.0.10
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: A simple system monitor written in QT
|
Summary: A simple system monitor written in QT
|
||||||
License: GPL-3+ GPL-2+
|
License: GPL-3+ GPL-2+
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Patch01: 0001-modify-version-is-pull.patch
|
||||||
|
|
||||||
BuildRequires: cmake >= 2.6
|
BuildRequires: cmake >= 2.6
|
||||||
BuildRequires: qt5-qtbase-devel >= 5.1
|
BuildRequires: qt5-qtbase-devel >= 5.1
|
||||||
@ -39,6 +40,7 @@ A simple system monitor written in QT
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export PATH=%{_qt5_bindir}:$PATH
|
export PATH=%{_qt5_bindir}:$PATH
|
||||||
@ -83,6 +85,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/ukui-system-monitor/translations/*
|
%{_datadir}/ukui-system-monitor/translations/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 7 2022 pei-jiankang <peijiankang@kylinos.cn> - 2.0.10-3
|
||||||
|
- modify version is pull
|
||||||
|
|
||||||
* Tue Mar 1 2022 douyan <douyan@kylinos.cn> - 2.0.10-2
|
* Tue Mar 1 2022 douyan <douyan@kylinos.cn> - 2.0.10-2
|
||||||
- add translation file
|
- add translation file
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user