mtnpatch: replace split with regex
authorJustin Patrin <papercrane@gmail.com>
Mon, 5 Jun 2006 04:44:34 +0000 (04:44 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Mon, 5 Jun 2006 04:44:34 +0000 (04:44 +0000)
classes/efl.bbclass
contrib/mtnpatch.py [changed mode: 0644->0755]
packages/e17/e-utils_20060501.bb [moved from packages/e17/e-utils_20060128.bb with 100% similarity]

index 9c49028..c258758 100644 (file)
@@ -44,6 +44,6 @@ do_stage_append () {
 }
 
 PACKAGES = "${PN} ${PN}-themes ${PN}-dev ${PN}-examples"
-FILES_${PN}-dev = "${bindir}/${PN}-config ${libdir}/pkgconfig ${libdir}/lib*.?a ${libdir}/lib*.a"
+FILES_${PN}-dev = "${bindir}/${PN}-config ${libdir}/pkgconfig ${libdir}/lib*.?a ${libdir}/lib*.a ${includedir}"
 FILES_${PN}-examples = "${bindir} ${datadir}"
 
old mode 100644 (file)
new mode 100755 (executable)
index 520ebfa..73143db
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-import sys, os, string, getopt
+import sys, os, string, getopt, re
 
 mtncmd = "monotone"
 
@@ -25,14 +25,10 @@ def main(argv = None):
         for line in input:
             if len(line) > 0:
                 if line[0] == '#':
-                    parts = line.split()
-                    if len(parts) > 2:
-                        cmd = parts[1]
-                        # deal with whilespace in filenames (badly)
-                        fileName = parts[2]
-                        i = 3
-                        while i < len(parts) and fileName.count('"') % 2:
-                            fileName += " %s" % parts[i]
+                    matches = re.search("#\s+(\w+)\s+\"(.*)\"", line)
+                    if matches is not None:
+                        cmd = matches.group(1)
+                        fileName = matches.group(2)
                         if cmd == "delete_file":
                             if reverse:
                                 print "%s add %s" % (mtncmd, fileName)