rpms/gnome-system-monitor/F-12 sysinfo.patch, NONE, 1.1 gnome-system-monitor.spec, 1.150, 1.151
Matthias Clasen
mclasen at fedoraproject.org
Wed Nov 4 04:01:12 UTC 2009
Author: mclasen
Update of /cvs/pkgs/rpms/gnome-system-monitor/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26880
Modified Files:
gnome-system-monitor.spec
Added Files:
sysinfo.patch
Log Message:
Fix sysinfo
sysinfo.patch:
sysinfo.cpp | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
--- NEW FILE sysinfo.patch ---
--- gnome-system-monitor-2.28.0/src/sysinfo.cpp 2009-07-13 07:02:39.000000000 -0400
+++ hacked/src/sysinfo.cpp 2009-11-03 22:57:40.812784384 -0500
@@ -220,6 +220,29 @@
}
};
+ class FedoraSysInfo
+ : public SysInfo
+ {
+ public:
+ FedoraSysInfo()
+ {
+ this->load_fedora_info();
+ }
+
+ private:
+ void load_fedora_info()
+ {
+ std::ifstream input("/etc/system-release");
+
+ if (input) {
+ std::getline(input, this->distro_release);
+ size_t n = this->distro_release.find ("release");
+ this->distro_name = this->distro_release;
+ this->distro_name.erase (n - 1);
+ this->distro_release.erase (0, n + strlen ("release") + 1);
+ }
+ }
+ };
class LSBSysInfo
: public SysInfo
@@ -400,7 +423,7 @@
return new NetBSDSysInfo;
}
- return new SysInfo;
+ return new FedoraSysInfo;
}
}
Index: gnome-system-monitor.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-system-monitor/F-12/gnome-system-monitor.spec,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -p -r1.150 -r1.151
--- gnome-system-monitor.spec 22 Sep 2009 14:22:55 -0000 1.150
+++ gnome-system-monitor.spec 4 Nov 2009 04:01:12 -0000 1.151
@@ -12,7 +12,7 @@
Summary: Process and resource monitor
Name: gnome-system-monitor
Version: 2.28.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://www.gnome.org/
@@ -55,6 +55,9 @@ Patch3: buttons.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=592758
Patch4: memmapsdialog.patch
+# Don't rely on lsb_release for sysinfo
+Patch5: sysinfo.patch
+
Requires(pre): GConf2 >= %{gconf_version}
Requires(post): GConf2 >= %{gconf_version}
Requires(post): scrollkeeper
@@ -73,6 +76,7 @@ such as CPU and memory.
%patch2 -p1 -b .polkit1
%patch3 -p1 -b .buttons
%patch4 -p1 -b .memmapsdialog
+%patch5 -p1 -b .sysinfo
autoreconf -i -f
@@ -155,6 +159,9 @@ scrollkeeper-update -q
%changelog
+* Tue Nov 3 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.0-3
+- Don't rely on lsb_release for sysinfo (#532860)
+
* Tue Sep 22 2009 Matthias Clasen <mclasen at redhat.com> - 2.28.0-2
- Include more translations for 'About this computer'
More information about the fedora-extras-commits
mailing list