rpms/rhpl/F-9 rhpl-0.215-getSparcMachine.patch, NONE, 1.1 rhpl.spec, 1.115, 1.116

Tom Callaway spot at fedoraproject.org
Fri Dec 12 22:35:01 UTC 2008


Author: spot

Update of /cvs/pkgs/rpms/rhpl/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2370

Modified Files:
	rhpl.spec 
Added Files:
	rhpl-0.215-getSparcMachine.patch 
Log Message:
add getSparcMachine

rhpl-0.215-getSparcMachine.patch:

--- NEW FILE rhpl-0.215-getSparcMachine.patch ---
diff -up rhpl-0.215/src/__init__.py.BAD rhpl-0.215/src/__init__.py
--- rhpl-0.215/src/__init__.py.BAD	2008-12-12 17:26:30.000000000 -0500
+++ rhpl-0.215/src/__init__.py	2008-12-12 17:30:45.000000000 -0500
@@ -66,3 +66,20 @@ def getPPCMachine():
                 return type[1]
 
     return None
+
+def getSparcMachine():
+    machine = None
+
+    if getArch() != "sparc":
+	return None
+
+    f = open('/proc/cpuinfo', 'r')
+    lines = f.readlines()
+    f.close()
+    for line in lines:
+	if line.find('type') != -1:
+            machine = line.split(':')[1].strip()
+            return machine
+
+    return None
+


Index: rhpl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhpl/F-9/rhpl.spec,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- rhpl.spec	1 May 2008 03:16:39 -0000	1.115
+++ rhpl.spec	12 Dec 2008 22:34:29 -0000	1.116
@@ -3,9 +3,10 @@
 Summary: Library of Python code used by installation and configuration tools
 Name: rhpl
 Version: 0.215
-Release: 3
+Release: 4
 Source0: %{name}-%{version}.tar.bz2
 Patch0: rhpl-0.215-inet.patch
+Patch1: rhpl-0.215-getSparcMachine.patch
 License: GPLv2+
 Group: System Environment/Libraries
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -23,6 +24,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 make
@@ -43,6 +45,9 @@
 %{python_sitearch}/rhpl
 
 %changelog
+* Fri Dec 12 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 0.215-4
+- add getSparcMachine function
+
 * Wed Apr 30 2008 Jeremy Katz <katzj at redhat.com> - 0.215-3
 - Patch hadn't actually been applied, but we've adjusted the 
   xkeyboard-config to have the inet bits by default without needing to specify




More information about the fedora-extras-commits mailing list