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-04-03 10:11:40 +0300
commit168ea666b8a89fc09008d5c54febb522a57b9c0f (patch)
tree7b4752982cfd4c8aaabf4f52cb79fac108b133ff
parent5c7a8d682c2a5e31d625ad5fce11615078eb4c3a (diff)
downloadgit-buildpackage-168ea666b8a89fc09008d5c54febb522a57b9c0f.tar.gz
git-buildpackage-168ea666b8a89fc09008d5c54febb522a57b9c0f.tar.bz2
git-buildpackage-168ea666b8a89fc09008d5c54febb522a57b9c0f.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 7faaaf14..cc72f64c 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