Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=d650004546e4001439c39075f36859dd402dfe06

commit d650004546e4001439c39075f36859dd402dfe06
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Wed Oct 6 20:31:56 2010 +0200

wicd-1.7.0-1-x86_64
*version bump
*added patch for python 2.7
*closed #4334 #4331

diff --git a/source/xapps-extra/wicd/FrugalBuild 
b/source/xapps-extra/wicd/FrugalBuild
index befa2f7..54a8289 100644
--- a/source/xapps-extra/wicd/FrugalBuild
+++ b/source/xapps-extra/wicd/FrugalBuild
@@ -2,8 +2,8 @@
# Maintainer: bouleetbil <bouleet...@frogdev.info>

pkgname=wicd
-pkgver=1.6.2.2
-pkgrel=2
+pkgver=1.7.0
+pkgrel=1
pkgdesc="A wired and wireless network manager for Linux"
depends=('dbus-python' 'pygtk' 'dhcp' 'dhcpcd' 'wireless_tools' 
'wpa_supplicant'\
'ethtool' 'python>=2.7' 'urwid' 'python-wpactrl' 'python-iwscan')
@@ -14,12 +14,14 @@ _F_gnome_iconcache="y"
_F_gnome_desktop="y"
_F_sourceforge_realname="wicd-stable"
Finclude sourceforge gnome-scriptlet
-source=($source rc.wicd)
-sha1sums=('97e66d550ebc483a699c8e87482f82c9185bc0c8' \
-          '3c4a5da2f7fa818517029921e0a389cc443e993e')
+source=($source rc.wicd wicd-no-deepcopy.patch)
+sha1sums=('76d9c0ad7b020ff1abac5c92c301739a04d5595e' \
+          '3c4a5da2f7fa818517029921e0a389cc443e993e' \
+          '01d56e9a73bc781e8e1f8b88481192c0be211822')

build() {
Fcd
+       Fpatchall
python ./setup.py configure --no-install-init --no-install-docs 
--resume=/usr/share/wicd/scripts/ --suspend=/usr/share/wicd/scripts/ --verbose 
|| Fdie
python ./setup.py build || Fdie
Fmakeinstall
diff --git a/source/xapps-extra/wicd/wicd-no-deepcopy.patch 
b/source/xapps-extra/wicd/wicd-no-deepcopy.patch
new file mode 100644
index 0000000..04cac9a
--- /dev/null
+++ b/source/xapps-extra/wicd/wicd-no-deepcopy.patch
@@ -0,0 +1,50 @@
+--- wicd/configmanager.py      2010-01-15 05:49:11.000000000 +0100
++++ wicd/configmanager.py.new  2010-10-05 22:10:33.267799689 +0200
+@@ -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()
+
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to