guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/06: gnu: wicd: Add patch to fix template instantiation.


From: Ludovic Courtès
Subject: 01/06: gnu: wicd: Add patch to fix template instantiation.
Date: Sat, 09 May 2015 21:54:05 +0000

civodul pushed a commit to branch master
in repository guix.

commit 6f05630ba6848fa666f4ea57aab7f7ffbc15fc72
Author: Ludovic Courtès <address@hidden>
Date:   Sat May 9 15:40:14 2015 +0200

    gnu: wicd: Add patch to fix template instantiation.
    
    * gnu/packages/patches/wicd-template-instantiation.patch: New file.
    * gnu-system.am (dist_patch_DATA): Add it.
    * gnu/packages/wicd.scm (wicd)[source]: Use it.
---
 gnu-system.am                                      |    1 +
 .../patches/wicd-template-instantiation.patch      |   29 ++++++++++++++++++++
 gnu/packages/wicd.scm                              |    4 ++-
 3 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 77c7836..d3e91ed 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -562,6 +562,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/w3m-fix-compile.patch                   \
   gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch      \
   gnu/packages/patches/weex-vacopy.patch                       \
+  gnu/packages/patches/wicd-template-instantiation.patch       \
   gnu/packages/patches/wicd-urwid-1.3.patch                    \
   gnu/packages/patches/wmctrl-64-fix.patch                     \
   gnu/packages/patches/wpa-supplicant-CVE-2015-1863.patch      \
diff --git a/gnu/packages/patches/wicd-template-instantiation.patch 
b/gnu/packages/patches/wicd-template-instantiation.patch
new file mode 100644
index 0000000..16d8fa6
--- /dev/null
+++ b/gnu/packages/patches/wicd-template-instantiation.patch
@@ -0,0 +1,29 @@
+Wicd 1.7.3 fails to instantiate template lines that have several
+variable references.  For instance, the line:
+
+  wep_key$_KEY_INDEX=$_KEY
+
+which is found in in the 'wep-hex' template, expands to these two
+lines:
+
+  wep_key0=$_KEY
+  wep_key0=123456789ab
+
+This patch fixes that by only emitting the fully substituted line.
+
+Patch by Ludovic Courtès <address@hidden>.
+
+--- a/wicd/misc.py     2012-11-17 00:07:08 +0000
++++ b/wicd/misc.py     2015-05-09 11:22:37 +0000
+@@ -321,11 +321,11 @@ def ParseEncryption(network):
+                                 rep_val = '0'
+                         if rep_val:
+                             line = line.replace("$_%s" % cur_val, 
str(rep_val))
+-                            config_file = ''.join([config_file, line])
+                         else:
+                             print "Ignoring template line: '%s'" % line
+                     else:
+                         print "Weird parsing error occurred"
++                config_file = ''.join([config_file, line])
+             else:  # Just a regular entry.
+                 config_file = ''.join([config_file, line])
diff --git a/gnu/packages/wicd.scm b/gnu/packages/wicd.scm
index 1953a56..779ec84 100644
--- a/gnu/packages/wicd.scm
+++ b/gnu/packages/wicd.scm
@@ -44,7 +44,9 @@
                            "/+download/wicd-" version ".tar.gz"))
        (sha256
         (base32 "00c4rq753bhg64rv1v9yl834ssq7igyy7cz3swp287b5n5bqiqwi"))
-       (patches (list (search-patch "wicd-urwid-1.3.patch")))))
+       (patches (map search-patch
+                     '("wicd-urwid-1.3.patch"
+                       "wicd-template-instantiation.patch")))))
     (build-system python-build-system)
     (native-inputs `(("gettext" ,gnu-gettext)))
     (inputs `(("dbus" ,dbus)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]