summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-11-21 12:51:53 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-03-08 14:04:00 +0200
commit7653a3fdf01181029617a643c0e3c0bdc71f196a (patch)
tree274817b873fb6b4a9129890a36279e18506137b4
parent67ff1bc212784f945fc0de82d5a4a279fb421487 (diff)
downloadgit-buildpackage-7653a3fdf01181029617a643c0e3c0bdc71f196a.tar.gz
git-buildpackage-7653a3fdf01181029617a643c0e3c0bdc71f196a.tar.bz2
git-buildpackage-7653a3fdf01181029617a643c0e3c0bdc71f196a.zip
rpm: rename the 'GbpIgnorePatch' special key in spec parsing
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>
-rw-r--r--gbp/rpm/__init__.py4
-rw-r--r--tests/test_rpm_data/rpmbuild/SPECS/gbp-test.spec2
-rw-r--r--tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec2
-rw-r--r--tests/test_rpm_data/specs/gbp-test-reference.spec2
4 files changed, 5 insertions, 5 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index 1d70b5ad..bec5f1fb 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -122,7 +122,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",
@@ -269,7 +269,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:
diff --git a/tests/test_rpm_data/rpmbuild/SPECS/gbp-test.spec b/tests/test_rpm_data/rpmbuild/SPECS/gbp-test.spec
index 8a07d662..c46a734e 100644
--- a/tests/test_rpm_data/rpmbuild/SPECS/gbp-test.spec
+++ b/tests/test_rpm_data/rpmbuild/SPECS/gbp-test.spec
@@ -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
diff --git a/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec b/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec
index 932b8e8f..d5a228fd 100644
--- a/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec
+++ b/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec
@@ -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
diff --git a/tests/test_rpm_data/specs/gbp-test-reference.spec b/tests/test_rpm_data/specs/gbp-test-reference.spec
index 884a64ca..050d1398 100644
--- a/tests/test_rpm_data/specs/gbp-test-reference.spec
+++ b/tests/test_rpm_data/specs/gbp-test-reference.spec
@@ -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