]> git.pld-linux.org Git - packages/galternatives.git/blob - galternatives-fedora.patch
1163b9e5d339e273cc09659adfab067ff317b393
[packages/galternatives.git] / galternatives-fedora.patch
1 --- ./setup.py  2004-06-14 18:04:11.000000000 -0400
2 +++ ./setup.py.new      2006-12-27 20:28:20.000000000 -0500
3 @@ -16,14 +16,6 @@
4      os.chdir ('%s/translations' % (curdir))
5      os.system ('./update-translations.sh')
6  
7 -    pipe = os.popen ('./list-mos.sh')
8 -    while True:
9 -        line = pipe.readline ().strip ()
10 -        if line == '':
11 -            break
12 -        data.append (('share/locale/%s/LC_MESSAGES' % (line), ['translations/%s/galternatives.mo' % (line)]))
13 -    pipe.close ()
14 -    print data
15      os.chdir (curdir)
16  
17  if __name__ == '__main__' :
18 --- ./galternatives/main.py     2005-08-17 21:21:04.000000000 -0400
19 +++ ./galternatives/main.py.new 2006-12-27 22:30:19.000000000 -0500
20 @@ -1,8 +1,11 @@
21  #!/usr/bin/python
22  import pygtk
23  pygtk.require ('2.0')
24 -import gtk, gobject
25 -from gtk import glade
26 +try:
27 +   import gtk, gobject
28 +   from gtk import glade
29 +except RuntimeError:
30 +   pass
31  
32  from common import PACKAGE
33  import sys, os, gettext
34 --- ./galternatives/alternative.py      2004-11-21 23:02:33.000000000 -0500
35 +++ ./galternatives/alternative.py.new  2005-11-10 01:00:25.000000000 -0500
36 @@ -64,7 +64,7 @@
37              pass
38  
39          # now get the real information!
40 -        altfile = open ('/var/lib/dpkg/alternatives/%s' % (unixname))
41 +        altfile = open ('/var/lib/alternatives/%s' % (unixname))
42  
43          # parsing file
44          self.option_status = altfile.readline ().strip ()
45 @@ -99,7 +99,18 @@
46  
47              odict = {}
48              odict['path'] = line
49 -            odict['priority'] = altfile.readline ().strip ()
50 +
51 +        # Here is an altercation to the upstream code to cater for the
52 +        # Redhat specific --initscript option
53 +            line = altfile.readline ().strip ()
54 +            ls = line.split()
55 +            if len(ls) == 2:
56 +               odict['priority'] = ls[0]
57 +               odict['service'] = ls[1]
58 +            else:
59 +               odict['priority'] = line
60 +               odict['service'] = ''
61 +
62              print_debug (odict)
63              optslaves = []
64              for count in range(len (self.slaves)):
65 --- galternatives-0.13.5/galternatives/main.py~ 2016-02-02 21:17:26.000000000 +0200
66 +++ galternatives-0.13.5/galternatives/main.py  2016-02-02 21:20:03.389884431 +0200
67 @@ -284,9 +284,15 @@
68          alt = self.alternative
69          unixname = alt.get_unixname ()
70          option = self.options_model.get_value (iter, self.OPTIONS)
71 +        # Here is an altercation to the upstream code to cater for the
72 +        # Redhat specific --initscript option
73 +        for opt in alt.get_options ():
74 +            inits = opt['service']
75  
76          cmd = '%s --set %s %s  > /dev/null 2>&1' % (UPDATE_ALTERNATIVES, unixname, option)
77          result = os.system (cmd)
78 +        if inits != '':
79 +            os.system ('/sbin/chkconfig %s on > /dev/null 2>&1' % (inits))
80  
81          print_debug (cmd)
82          print_debug ('Result: %d' % (result))
83 @@ -347,7 +353,7 @@
84                                       text=self.SLAVEPATH)
85          self.slaves_tv.append_column (column)
86  
87 -    def update_alternatives (self, directory='/var/lib/dpkg/alternatives/'):
88 +    def update_alternatives (self, directory='/var/lib/alternatives/'):
89          self.alternatives_model.clear ()
90          alternatives = os.listdir (directory)
91          alternatives.sort ()
This page took 0.050225 seconds and 2 git commands to generate.