summaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorsibel <lesibel@free.fr>2011-01-17 13:27:16 +0100
committersibel <lesibel@free.fr>2011-01-17 13:27:16 +0100
commit827ea761791c7aca4fa757f7ebf405de41fa2395 (patch)
tree4ae17df777fc5d13fb11567dd080fb214bad6dbc /extra
parenta934c99d5d94b51dc90154de5d5884f750abc0f2 (diff)
downloadnutyx-pakxe-827ea761791c7aca4fa757f7ebf405de41fa2395.tar.gz
nutyx-pakxe-827ea761791c7aca4fa757f7ebf405de41fa2395.tar.bz2
nutyx-pakxe-827ea761791c7aca4fa757f7ebf405de41fa2395.tar.xz
nutyx-pakxe-827ea761791c7aca4fa757f7ebf405de41fa2395.zip
wicd, correction port
Diffstat (limited to 'extra')
-rw-r--r--extra/wicd/.md5sum2
-rw-r--r--extra/wicd/Pkgfile11
-rw-r--r--extra/wicd/wicd-1.7.0-python-2.7.patch72
-rw-r--r--extra/wicd/wicd-1.7.0-script-execution.patch24
4 files changed, 107 insertions, 2 deletions
diff --git a/extra/wicd/.md5sum b/extra/wicd/.md5sum
index 543ade4e2..19739afba 100644
--- a/extra/wicd/.md5sum
+++ b/extra/wicd/.md5sum
@@ -1,3 +1,5 @@
+1b7ec95efcb8dc0fe48111da19b395b6 wicd-1.7.0-python-2.7.patch
+f4c377a25aa077cb76955124adfcc03f wicd-1.7.0-script-execution.patch
003d2e67240989db55934553437ba32a wicd-1.7.0.tar.gz
b8edd56cf084347b0ae6dc0e02d1b747 wicd-locale.patch
190bac25d634be162bb4b848d806ef8a wicd.desktop
diff --git a/extra/wicd/Pkgfile b/extra/wicd/Pkgfile
index 9d5c92b6e..a6d847a8d 100644
--- a/extra/wicd/Pkgfile
+++ b/extra/wicd/Pkgfile
@@ -7,12 +7,19 @@
name=wicd
version=1.7.0
-release=6
+release=7
source=(http://downloads.sourceforge.net/$name/wicd-$version.tar.gz \
- http://nutyx.meticul.eu/files/patchs/$name/{wicd_in_usr.patch,wicd-locale.patch,wicd.desktop} )
+ http://nutyx.meticul.eu/files/patchs/$name/{wicd_in_usr.patch,wicd-locale.patch,wicd.desktop}
+ wicd-1.7.0-python-2.7.patch
+ wicd-1.7.0-script-execution.patch)
build() {
cd $name-$version
+ patch -p0 < ../wicd-1.7.0-script-execution.patch
+ patch -p1 -i ../wicd-1.7.0-python-2.7.patch
+ find . -type f -exec sed -i 's@#!/usr.*python@#!/usr/bin/python2@' {} \;
+ export PYTHON=python2
+
python2 setup.py configure --no-install-init \
--resume=/usr/share/wicd/scripts/ \
--suspend=/usr/share/wicd/scripts --verbose
diff --git a/extra/wicd/wicd-1.7.0-python-2.7.patch b/extra/wicd/wicd-1.7.0-python-2.7.patch
new file mode 100644
index 000000000..51a2c8312
--- /dev/null
+++ b/extra/wicd/wicd-1.7.0-python-2.7.patch
@@ -0,0 +1,72 @@
+diff -ur wicd-1.7.0/wicd/configmanager.py wicd-1.7.0.new/wicd/configmanager.py
+--- wicd-1.7.0/wicd/configmanager.py 2010-01-15 05:49:11.000000000 +0100
++++ wicd-1.7.0.new/wicd/configmanager.py 2010-10-08 13:14:22.084345024 +0200
+@@ -35,7 +35,7 @@
+ class ConfigManager(RawConfigParser):
+ """ A class that can be used to manage a given configuration file. """
+ def __init__(self, path, debug=False, mark_whitespace="`'`"):
+- RawConfigParser.__init__(self)
++ RawConfigParser.__init__(self, allow_no_value=True)
+ self.config_file = path
+ self.debug = debug
+ self.mrk_ws = mark_whitespace
+@@ -176,28 +176,35 @@
+
+
+ def _copy_section(self, name):
+- # Yes, deepcopy sucks, but it is robust to changes in both
+- # this class and RawConfigParser.
+- p = copy.deepcopy(self)
+- for sname in p.sections():
+- if sname != name:
+- p.remove_section(sname)
++ p = ConfigManager("", self.debug, self.mrk_ws)
++ p.add_section(name)
++ for (iname, value) in self.items(name):
++ p.set(name, iname, value)
++ # Store the filename this section was read from.
+ p.config_file = p.get_option(name, '_filename_', p.config_file)
+ p.remove_option(name, '_filename_')
+ return p
+
+ def write(self):
+ """ Writes the loaded config file to disk. """
+- # Really don't like this deepcopy.
+- p = copy.deepcopy(self)
+- for sname in p.sections():
+- fname = p.get_option(sname, '_filename_')
++ in_this_file = []
++ for sname in self.sections():
++ fname = self.get_option(sname, '_filename_')
+ if fname and fname != self.config_file:
++ # Write sections from other files
+ section = self._copy_section(sname)
+- p.remove_section(sname)
+ section._write_one()
++ else:
++ # Save names of local sections
++ in_this_file.append(sname)
+
+- for sname in p.sections():
++ # Make an instance with only these sections
++ p = ConfigManager("", self.debug, self.mrk_ws)
++ p.config_file = self.config_file
++ for sname in in_this_file:
++ p.add_section(sname)
++ for (iname, value) in self.items(sname):
++ p.set(sname, iname, value)
+ p.remove_option(sname, '_filename_')
+ p._write_one()
+
+diff -ur wicd-1.7.0/wicd/wicd-daemon.py wicd-1.7.0.new/wicd/wicd-daemon.py
+--- wicd-1.7.0/wicd/wicd-daemon.py 2010-01-15 05:49:11.000000000 +0100
++++ wicd-1.7.0.new/wicd/wicd-daemon.py 2010-10-08 13:11:15.811786603 +0200
+@@ -1802,7 +1802,7 @@
+ wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus)
+ daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
+ if not no_poll:
+- child_pid = Popen([misc.find_path("python"), "-O",
++ child_pid = Popen([misc.find_path("python2"), "-O",
+ os.path.join(wpath.daemon, "monitor.py")],
+ shell=False, close_fds=True).pid
+ atexit.register(on_exit, child_pid)
diff --git a/extra/wicd/wicd-1.7.0-script-execution.patch b/extra/wicd/wicd-1.7.0-script-execution.patch
new file mode 100644
index 000000000..cd8e42834
--- /dev/null
+++ b/extra/wicd/wicd-1.7.0-script-execution.patch
@@ -0,0 +1,24 @@
+=== modified file 'wicd/networking.py'
+--- wicd/networking.py 2010-01-15 04:02:10 +0000
++++ wicd/networking.py 2010-01-27 19:06:21 +0000
+@@ -215,8 +215,8 @@
+ if self.pre_disconnect_script:
+ print 'Running pre-disconnect script'
+ misc.ExecuteScript(expand_script_macros(self.pre_disconnect_script,
+- 'pre-disconnection', (mac,
+- name)),
++ 'pre-disconnection',
++ mac, name),
+ self.debug)
+ iface.ReleaseDHCP()
+ iface.SetAddress('0.0.0.0')
+@@ -229,7 +229,7 @@
+ print 'Running post-disconnect script'
+ misc.ExecuteScript(expand_script_macros(self.post_disconnect_script,
+ 'post-disconnection',
+- (mac, name)),
++ mac, name),
+ self.debug)
+
+ def ReleaseDHCP(self):
+