SOURCES: python-booty-pld.patch - /etc/pld-release parsing; thx pa...

glen glen at pld-linux.org
Tue Jun 6 01:35:43 CEST 2006


Author: glen                         Date: Mon Jun  5 23:35:43 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- /etc/pld-release parsing; thx patrys!

---- Files affected:
SOURCES:
   python-booty-pld.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/python-booty-pld.patch
diff -u SOURCES/python-booty-pld.patch:1.1 SOURCES/python-booty-pld.patch:1.2
--- SOURCES/python-booty-pld.patch:1.1	Tue Jun  6 00:55:18 2006
+++ SOURCES/python-booty-pld.patch	Tue Jun  6 01:35:38 2006
@@ -1,7 +1,26 @@
---- booty-0.71/butil.py~	2005-08-13 00:03:31.000000000 +0300
-+++ booty-0.71/butil.py	2006-06-06 01:53:52.720489440 +0300
-@@ -176,6 +176,6 @@
-             return lines[1][:-1]
+--- booty-0.71/butil.py	2006-06-06 01:53:52.720489440 +0300
++++ booty-0.71/butil.py	2006-06-06 02:01:46.891108363 +0300
+@@ -151,15 +151,12 @@
+ 
+ # returns a product name to use for the boot loader string
+ def getProductName():
+-    # try redhat-release first
+-    if os.access("/etc/redhat-release", os.R_OK):
+-        f = open("/etc/redhat-release", "r")
++    # try pld-release first
++    if (os.access("/etc/pld-release", os.R_OK)):
++        f = open("/etc/pld-release", "r")
+         lines = f.readlines()
+         f.close()
+-        for buf in lines:
+-            relidx = buf.find(" release")
+-            if relidx != -1:
+-                return buf[:relidx]
++        return lines[0]
+ 
+     if os.access("/tmp/product/.buildstamp", os.R_OK):
+         path = "/tmp/product/.buildstamp"
+@@ -177,5 +174,5 @@
  
      # fall back
 -    return "Red Hat Linux"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/python-booty-pld.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list