rpm: rename the 'GbpIgnorePatch' special key in spec parsing
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 21 Nov 2012 10:51:53 +0000 (12:51 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 7 Jan 2014 14:21:29 +0000 (16:21 +0200)
to 'Gbp-Ignore-Patches' for better readability. All the special keys (or
"gbp-tags") now have to start with the "Gbp-" prefix.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/rpm/__init__.py
tests/test_rpm_data/rpmbuild/SPECS/gbp-test.spec
tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec
tests/test_rpm_data/specs/gbp-test-reference.spec

index adf2a6ebd6722abf773a0d9cbad861cec1d2ff3d..27ee3d30f2cf5ef1354d9819f810230f8f21df20 100644 (file)
@@ -125,7 +125,7 @@ class SpecFile(object):
                          '(?P<value>\S(.*\S)?)\s*$', flags=re.I)
     macro_re = re.compile(r'^%(?P<name>[a-z]+)(?P<num>[0-9]+)?'
                            '(\s+(?P<args>.*))?$')
-    gbptag_re = re.compile(r'^\s*#\s*gbp(?P<name>[a-z-]+)'
+    gbptag_re = re.compile(r'^\s*#\s*gbp-(?P<name>[a-z-]+)'
                             '(\s*:\s*(?P<args>\S.*))?$', flags=re.I)
 
     def __init__(self, specfile, skip_tags=("ExcludeArch", "ExcludeOS",
@@ -272,7 +272,7 @@ class SpecFile(object):
             line = str(lineobj)
             m = self.gbptag_re.match(line)
             if m:
-                if m.group('name').lower() == 'ignorepatch':
+                if m.group('name').lower() == 'ignore-patches':
                     dataitems = m.group('args').strip().split()
                     ignorepatch = sorted([int(num) for num in dataitems])
                 else:
index 8a07d662a9a561293149aeaef9b4f9c06556a249..c46a734ebe7ae9c39de33f7d6884abe179623657 100644 (file)
@@ -7,7 +7,7 @@ License:    GPLv2
 Source:     %{name}-%{version}.tar.bz2
 Source1:    foo.txt
 Source20:   bar.tar.gz
-# GbpIgnorePatch: 0
+# Gbp-Ignore-Patches: 0
 Patch0:     my.patch
 Patch10:    my2.patch
 Patch20:    my3.patch
index 932b8e8f574d357d4192ae63bc40805e4e6cad79..d5a228fd19f92dc4064b363b33a55411cc5a5446 100644 (file)
@@ -8,7 +8,7 @@ License:    GPLv2
 Source10:   ftp://ftp.host.com/%{name}-%{version}.tar.gz
 Source:     foo.txt
 Source20:   bar.tar.gz
-# GbpIgnorePatch: 0
+# Gbp-Ignore-Patches: 0
 Patch:      my.patch
 Patch10:    my2.patch
 Patch20:    my3.patch
index 884a64caea101f4a6db9d43bdd74dafe70235552..050d1398d0f71a09674dc1d2430b3d04da656cd9 100644 (file)
@@ -7,7 +7,7 @@ License:    GPLv2
 Source:     %{name}-%{version}.tar.bz2
 Source1:    foo.txt
 Source20:   bar.tar.gz
-# GbpIgnorePatch: 0
+# Gbp-Ignore-Patches: 0
 Patch0:     my.patch
 # Patches auto-generated by git-buildpackage:
 Patch1:     new.patch