[SCM] zynjacku/master: 0009-regex_uris_command_line.patch: Add command line support for /regex/ syntax for URIs.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Thu Feb 10 14:23:06 UTC 2011


The following commit has been merged in the master branch:
commit 0ad166de7ee69a83de6a19067037a048a3c2a5e2
Author: Alessio Treglia <alessio at debian.org>
Date:   Thu Feb 10 15:23:05 2011 +0100

    0009-regex_uris_command_line.patch: Add command line support for /regex/ syntax for URIs.

diff --git a/debian/patches/0009-regex_uris_command_line.patch b/debian/patches/0009-regex_uris_command_line.patch
new file mode 100644
index 0000000..c27c24e
--- /dev/null
+++ b/debian/patches/0009-regex_uris_command_line.patch
@@ -0,0 +1,31 @@
+From: Krzysztof Foltman <wdev at foltman.com>
+Description: Add command line support for /regex/ syntax for URIs.
+Origin: upstream,commit:5ac4d3e05fd2dcd6a92f4a9ad334a810e8b4d8d4
+---
+ zynworld/host.py |   15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+--- zynjacku.orig/zynworld/host.py
++++ zynjacku/zynworld/host.py
+@@ -2276,6 +2276,21 @@ class host:
+         return
+ 
+     def new_plugin(self, uri, parameters=[], maps={}):
++        if uri.startswith("/") and uri.endswith("/"):
++            regexp = re.compile(uri[1:-1])
++            candidates = []
++            for f in self.lv2db.getPluginList():
++                if regexp.search(f):
++                    candidates.append(f)
++            if len(candidates) == 0:
++                print "No plugins found matching %s" % uri
++                return False
++            elif len(candidates) >= 2:
++                print "More than one plugin match %s:" % uri
++                for l in candidates:
++                    print "    %s" % l
++                return False
++            uri = candidates[0]
+         info = self.lv2db.getPluginInfo(uri)
+         if not info:
+             print 'Cannot get info for plugin "%s"' % uri

-- 
zynjacku packaging



More information about the pkg-multimedia-commits mailing list