rpms/gnome-system-monitor/devel gnome-system-monitor-2.17.2.1-fedora.patch, NONE, 1.1 gnome-system-monitor.spec, 1.69, 1.70

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sat Nov 18 06:25:00 UTC 2006


Author: mclasen

Update of /cvs/dist/rpms/gnome-system-monitor/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32367

Modified Files:
	gnome-system-monitor.spec 
Added Files:
	gnome-system-monitor-2.17.2.1-fedora.patch 
Log Message:
add fedora name


gnome-system-monitor-2.17.2.1-fedora.patch:
 sysinfo.cpp |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+)

--- NEW FILE gnome-system-monitor-2.17.2.1-fedora.patch ---
--- gnome-system-monitor-2.17.2.1/src/sysinfo.cpp.fedora	2006-11-02 13:45:35.000000000 -0500
+++ gnome-system-monitor-2.17.2.1/src/sysinfo.cpp	2006-11-18 01:09:14.000000000 -0500
@@ -141,10 +141,55 @@
   };
 
 
+  class RedHatSysInfo
+    : public SysInfo
+  {
+  public:
+    RedHatSysInfo() : SysInfo(_("Unknown distro"))
+    {
+      this->load_redhat_info();
+    }
+
+  private:
+    void load_redhat_info()
+    {
+      gchar *text, *t, *s;
+   
+      if (!g_file_get_contents ("/etc/redhat-release", &text, NULL, NULL))
+        return;
+      
+      t = strstr (text, " release");
+
+      if (!t)
+        {
+           g_free (text);
+	   return;
+        } 
+
+      *t = '\0';
+
+      t += strlen (" release");
+	
+      while (*t == ' ')
+        t++;
+
+      s = strchr (t, ' ');
+
+      if (s)
+        *s = '\0';
+
+      this->distro_name = text;
+      this->distro_version = t;
+    }
+  };
+
+
   SysInfo* get_sysinfo()
   {
     if (g_file_test("/etc/debian_version", G_FILE_TEST_EXISTS))
       return new DebianSysInfo;
+    else if (g_file_test("/etc/redhat-release", G_FILE_TEST_EXISTS))
+      return new RedHatSysInfo;
     else
       return new SysInfo(_("Unknown distro"));
   }


Index: gnome-system-monitor.spec
===================================================================
RCS file: /cvs/dist/rpms/gnome-system-monitor/devel/gnome-system-monitor.spec,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- gnome-system-monitor.spec	13 Nov 2006 04:27:55 -0000	1.69
+++ gnome-system-monitor.spec	18 Nov 2006 06:24:57 -0000	1.70
@@ -12,12 +12,13 @@
 Summary: Simple process monitor
 Name: gnome-system-monitor
 Version: 2.17.2.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPL
 Group: Applications/System
 URL: http://www.gnome.org/
 Source: http://ftp.gnome.org/pub/GNOME/sources/gnome-system-monitor/2.15/gnome-system-monitor-%{version}.tar.bz2
 Source1: side.png
+Patch0: gnome-system-monitor-2.17.2.1-fedora.patch
 BuildRoot: %{_tmppath}/%{name}-root
 Requires: libgnomeui >= %{libgnomeui_version}
 Requires: libgtop2 >= %{libgtop2_version}
@@ -48,6 +49,8 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .fedora
+
 cp %{SOURCE1} pixmaps/
 
 %build
@@ -105,6 +108,9 @@
 %{_datadir}/omf/gnome-system-monitor/
 
 %changelog
+* Sat Nov 18 2006 Matthias Clasen <mclasen at redhat.com> - 2.17.2.1-2
+- Add disto info
+
 * Sun Nov 12 2006 Matthias Clasen <mclasen at redhat.com> - 2.17.2.1-1
 - Update to 2.17.2.1
 




More information about the fedora-cvs-commits mailing list