]> git.pld-linux.org Git - packages/anaconda.git/blob - anaconda-pld-release.patch
- use util-linux virtual
[packages/anaconda.git] / anaconda-pld-release.patch
1 diff -ur anaconda-11.2.0.24.org/partedUtils.py anaconda-11.2.0.24/partedUtils.py
2 --- anaconda-11.2.0.24.org/partedUtils.py       2007-01-16 20:58:13.000000000 +0100
3 +++ anaconda-11.2.0.24/partedUtils.py   2007-02-20 18:33:58.522623000 +0100
4 @@ -472,8 +472,8 @@
5      return None
6  
7  def getReleaseString(mountpoint):
8 -    if os.access(mountpoint + "/etc/redhat-release", os.R_OK):
9 -        f = open(mountpoint + "/etc/redhat-release", "r")
10 +    if os.access(mountpoint + "/etc/pld-release", os.R_OK):
11 +        f = open(mountpoint + "/etc/pld-release", "r")
12          try:
13              lines = f.readlines()
14          except IOError:
15 @@ -490,22 +490,12 @@
16  
17          # get the release name and version
18          # assumes that form is something
19 -        # like "Red Hat Linux release 6.2 (Zoot)"
20 -        if relstr.find("release") != -1:
21 -            try:
22 -                idx = relstr.find("release")
23 -                prod = relstr[:idx - 1]
24 -
25 -                ver = ""
26 -                for a in relstr[idx + 8:]:
27 -                    if a in string.digits + ".":
28 -                        ver = ver + a
29 -                    else:
30 -                        break
31 -
32 -                    relstr = prod + " " + ver
33 -            except:
34 -                pass # don't worry, just use the relstr as we have it
35 +       # like 2.99 PLD Linux (Th)
36 +       try:
37 +           relstr = relstr.split(' ')
38 +           relstr = relstr[0]
39 +       except:
40 +           pass # don't worry, just use the relstr as we have it
41          return relstr
42      return ""
43  
44 diff -ur anaconda-11.2.0.24.org/yuminstall.py anaconda-11.2.0.24/yuminstall.py
45 --- anaconda-11.2.0.24.org/yuminstall.py        2007-02-13 14:56:08.000000000 +0100
46 +++ anaconda-11.2.0.24/yuminstall.py    2007-02-20 18:26:50.814623000 +0100
47 @@ -1269,7 +1269,7 @@
48          # Figure out current version for upgrade nag and for determining weird
49          # upgrade cases
50          supportedUpgradeVersion = -1
51 -        for pkgtup in self.ayum.rpmdb.whatProvides('redhat-release', None, None):
52 +        for pkgtup in self.ayum.rpmdb.whatProvides('issue', None, None):
53              n, a, e, v, r = pkgtup
54              if supportedUpgradeVersion <= 0:
55                  val = rpmUtils.miscutils.compareEVR((None, '3', '1'),
This page took 0.038895 seconds and 3 git commands to generate.