diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-01-03 16:03:23 +0200 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-04-03 10:11:41 +0300 |
commit | bca8e7e24c8ee46624877c5afe9729ce86cc72ef (patch) | |
tree | e6a54abe6b5a992669a73e99194f06fadd3679c3 | |
parent | 3045dfdbc805738167c39f67622e0f7950d4c0be (diff) | |
download | git-buildpackage-bca8e7e24c8ee46624877c5afe9729ce86cc72ef.tar.gz git-buildpackage-bca8e7e24c8ee46624877c5afe9729ce86cc72ef.tar.bz2 git-buildpackage-bca8e7e24c8ee46624877c5afe9729ce86cc72ef.zip |
rpm helpers: parse 'nosource' and 'nopatch' sources correctly
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r-- | gbp/rpm/__init__.py | 4 | ||||
-rw-r--r-- | tests/test_rpm_data/specs/gbp-test-updates-reference.spec | 2 | ||||
-rw-r--r-- | tests/test_rpm_data/specs/gbp-test-updates.spec | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py index d70b90ec..98ceb8f5 100644 --- a/gbp/rpm/__init__.py +++ b/gbp/rpm/__init__.py @@ -412,7 +412,7 @@ class SpecFile(object): # workaround rpm parsing bug if num >= MAX_SOURCE_NUMBER: num = 0 - if typ == 1: + if typ == 1 or typ == 9: if num in self.sources: self.sources[num]['filename'] = os.path.basename(name) self.sources[num]['filename_base'],\ @@ -428,7 +428,7 @@ class SpecFile(object): self.sources[num]['prefix'] = self.sources[num]['filename_base'] + "/" else: gbp.log.err("BUG: we didn't correctly parse all 'Source' tags!") - if typ == 2: + if typ == 2 or typ == 10: if num in self.patches: self.patches[num]['filename'] = name else: diff --git a/tests/test_rpm_data/specs/gbp-test-updates-reference.spec b/tests/test_rpm_data/specs/gbp-test-updates-reference.spec index e6e6846c..eae2739a 100644 --- a/tests/test_rpm_data/specs/gbp-test-updates-reference.spec +++ b/tests/test_rpm_data/specs/gbp-test-updates-reference.spec @@ -15,6 +15,8 @@ Group: my_group Packager: my_packager Url: my_url Vcs: my_vcs +Nosource: 0 +Nopatch: 1 BuildRoot: my_buildroot Provides: my_provides Requires: my_requires diff --git a/tests/test_rpm_data/specs/gbp-test-updates.spec b/tests/test_rpm_data/specs/gbp-test-updates.spec index 19912442..0bc15712 100644 --- a/tests/test_rpm_data/specs/gbp-test-updates.spec +++ b/tests/test_rpm_data/specs/gbp-test-updates.spec @@ -19,6 +19,8 @@ Vcs: my_vcs Source: my_source Patch: my_%patch_fn_base Patch1: my_%{patch_fn_base}1 +Nosource: 0 +Nopatch: 1 BuildRoot: my_buildroot Provides: my_provides Requires: my_requires |