|
|
5ffbceb |
--- setup.py 2004-06-14 18:04:11.000000000 -0400
|
|
|
5ffbceb |
+++ setup.py.new 2006-12-27 20:28:20.000000000 -0500
|
|
|
5ffbceb |
@@ -16,14 +16,6 @@
|
|
|
5ffbceb |
os.chdir ('%s/translations' % (curdir))
|
|
|
5ffbceb |
os.system ('./update-translations.sh')
|
|
|
5ffbceb |
|
|
|
5ffbceb |
- pipe = os.popen ('./list-mos.sh')
|
|
|
5ffbceb |
- while True:
|
|
|
5ffbceb |
- line = pipe.readline ().strip ()
|
|
|
5ffbceb |
- if line == '':
|
|
|
5ffbceb |
- break
|
|
|
5ffbceb |
- data.append (('share/locale/%s/LC_MESSAGES' % (line), ['translations/%s/galternatives.mo' % (line)]))
|
|
|
5ffbceb |
- pipe.close ()
|
|
|
5ffbceb |
- print data
|
|
|
5ffbceb |
os.chdir (curdir)
|
|
|
5ffbceb |
|
|
|
5ffbceb |
if __name__ == '__main__' :
|
|
|
5ffbceb |
--- galternatives/main.py 2005-08-17 21:21:04.000000000 -0400
|
|
|
5ffbceb |
+++ galternatives/main.py.new 2006-12-27 22:30:19.000000000 -0500
|
|
|
5ffbceb |
@@ -1,8 +1,11 @@
|
|
|
5ffbceb |
#!/usr/bin/python
|
|
|
5ffbceb |
import pygtk
|
|
|
5ffbceb |
pygtk.require ('2.0')
|
|
|
5ffbceb |
-import gtk, gobject
|
|
|
5ffbceb |
-from gtk import glade
|
|
|
5ffbceb |
+try:
|
|
|
5ffbceb |
+ import gtk, gobject
|
|
|
5ffbceb |
+ from gtk import glade
|
|
|
5ffbceb |
+except RuntimeError:
|
|
|
5ffbceb |
+ pass
|
|
|
5ffbceb |
|
|
|
5ffbceb |
from common import PACKAGE
|
|
|
5ffbceb |
import sys, os, gettext
|
|
|
5ffbceb |
--- galternatives/alternative.py 2004-11-21 23:02:33.000000000 -0500
|
|
|
5ffbceb |
+++ galternatives/alternative.py.new 2005-11-10 01:00:25.000000000 -0500
|
|
|
5ffbceb |
@@ -64,7 +64,7 @@
|
|
|
5ffbceb |
pass
|
|
|
5ffbceb |
|
|
|
5ffbceb |
# now get the real information!
|
|
|
5ffbceb |
- altfile = open ('/var/lib/dpkg/alternatives/%s' % (unixname))
|
|
|
5ffbceb |
+ altfile = open ('/var/lib/alternatives/%s' % (unixname))
|
|
|
5ffbceb |
|
|
|
5ffbceb |
# parsing file
|
|
|
5ffbceb |
self.option_status = altfile.readline ().strip ()
|
|
|
5ffbceb |
@@ -99,7 +99,18 @@
|
|
|
5ffbceb |
|
|
|
5ffbceb |
odict = {}
|
|
|
5ffbceb |
odict['path'] = line
|
|
|
5ffbceb |
- odict['priority'] = altfile.readline ().strip ()
|
|
|
5ffbceb |
+
|
|
|
5ffbceb |
+ # Here is an altercation to the upstream code to cater for the
|
|
|
5ffbceb |
+ # Redhat specific --initscript option
|
|
|
5ffbceb |
+ line = altfile.readline ().strip ()
|
|
|
5ffbceb |
+ ls = line.split()
|
|
|
5ffbceb |
+ if len(ls) == 2:
|
|
|
5ffbceb |
+ odict['priority'] = ls[0]
|
|
|
5ffbceb |
+ odict['service'] = ls[1]
|
|
|
5ffbceb |
+ else:
|
|
|
5ffbceb |
+ odict['priority'] = line
|
|
|
5ffbceb |
+ odict['service'] = ''
|
|
|
5ffbceb |
+
|
|
|
5ffbceb |
print_debug (odict)
|
|
|
5ffbceb |
optslaves = []
|
|
|
5ffbceb |
for count in range(len (self.slaves)):
|
|
|
5ffbceb |
--- galternatives/main.py 2005-08-17 21:21:04.000000000 -0400
|
|
|
5ffbceb |
+++ galternatives/main.py.new 2005-11-10 01:01:12.000000000 -0500
|
|
|
5ffbceb |
@@ -282,8 +282,16 @@
|
|
|
5ffbceb |
alt = self.alternative
|
|
|
5ffbceb |
unixname = alt.get_unixname ()
|
|
|
5ffbceb |
option = self.options_model.get_value (iter, self.OPTIONS)
|
|
|
5ffbceb |
+ # Here is an altercation to the upstream code to cater for the
|
|
|
5ffbceb |
+ # Redhat specific --initscript option
|
|
|
5ffbceb |
+ for opt in alt.get_options ():
|
|
|
5ffbceb |
+ inits = opt['service']
|
|
|
5ffbceb |
|
|
|
5ffbceb |
- result = os.system ('/usr/sbin/update-alternatives --set %s %s > /dev/null 2>&1' % (unixname, option))
|
|
|
5ffbceb |
+ if inits == '':
|
|
|
5ffbceb |
+ result = os.system ('/usr/sbin/update-alternatives --set %s %s > /dev/null 2>&1' % (unixname, option))
|
|
|
5ffbceb |
+ else:
|
|
|
5ffbceb |
+ result = os.system ('/usr/sbin/update-alternatives --set %s %s > /dev/null 2>&1' % (unixname, option))
|
|
|
5ffbceb |
+ result2 = os.system ('/sbin/chkconfig %s on > /dev/null 2>&1' % (inits))
|
|
|
5ffbceb |
|
|
|
5ffbceb |
print_debug ('/usr/sbin/update-alternatives --set %s %s > /dev/null 2>&1' % (unixname, option))
|
|
|
5ffbceb |
print_debug ('Result: %d' % (result))
|
|
|
5ffbceb |
@@ -347,7 +353,7 @@
|
|
|
5ffbceb |
text=self.SLAVEPATH)
|
|
|
5ffbceb |
self.slaves_tv.append_column (column)
|
|
|
5ffbceb |
|
|
|
5ffbceb |
- def update_alternatives (self, directory='/var/lib/dpkg/alternatives/'):
|
|
|
5ffbceb |
+ def update_alternatives (self, directory='/var/lib/alternatives/'):
|
|
|
5ffbceb |
self.alternatives_model.clear ()
|
|
|
5ffbceb |
alternatives = os.listdir (directory)
|
|
|
5ffbceb |
alternatives.sort ()
|