diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-01-03 17:08:36 +0200 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-04-03 10:11:41 +0300 |
commit | b24c28d7ae4e24ad284f4b85160302d8e2637825 (patch) | |
tree | bec3b1fce2c437d2cc9bf79a61e3b3c10ca7e8ec /gbp | |
parent | bca8e7e24c8ee46624877c5afe9729ce86cc72ef (diff) | |
download | git-buildpackage-b24c28d7ae4e24ad284f4b85160302d8e2637825.tar.gz git-buildpackage-b24c28d7ae4e24ad284f4b85160302d8e2637825.tar.bz2 git-buildpackage-b24c28d7ae4e24ad284f4b85160302d8e2637825.zip |
rpm helpers: support all tags
Support all 'non-list' tags that we know of.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/rpm/__init__.py | 17 | ||||
-rw-r--r-- | gbp/rpm/policy.py | 2 |
2 files changed, 15 insertions, 4 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py index 98ceb8f5..11d5751c 100644 --- a/gbp/rpm/__init__.py +++ b/gbp/rpm/__init__.py @@ -132,6 +132,13 @@ class SpecFile(object): # Use rpm-python to parse the spec file content self._filtertags = ("excludearch", "excludeos", "exclusivearch", "exclusiveos","buildarch") + self._listtags = self._filtertags + ('source', 'patch', + 'requires', 'conflicts', 'recommends', + 'suggests', 'supplements', 'enhances', + 'provides', 'obsoletes', 'buildrequires', + 'buildconflicts', 'buildrecommends', + 'buildsuggests', 'buildsupplements', + 'buildenhances', 'collections') self._specinfo = self._parse_filtered_spec(self._filtertags) # Other initializations @@ -280,11 +287,15 @@ class SpecFile(object): except AttributeError: tagvalue = None # We don't support "multivalue" tags like "Provides:" or "SourceX:" - if type(tagvalue) is list: + # Rpm python doesn't support many of these, thus the explicit list + if type(tagvalue) is int or type(tagvalue) is long: + tagvalue = str(tagvalue) + elif type(tagvalue) is list or tagname in self._listtags: tagvalue = None elif not tagvalue: - # Rpm python doesn't give BuildRequires, for some reason - if tagname not in ('buildrequires',) + self._filtertags: + # Rpm python doesn't give the following, for reason or another + if tagname not in ('buildroot', 'nopatch', 'nosource', 'autoprov', + 'autoreq', 'autoreqprov') + self._filtertags: gbp.log.warn("BUG: '%s:' tag not found by rpm" % tagname) tagvalue = matchobj.group('value') linerecord = {'line': lineobj, diff --git a/gbp/rpm/policy.py b/gbp/rpm/policy.py index f714c23c..d09ab5d4 100644 --- a/gbp/rpm/policy.py +++ b/gbp/rpm/policy.py @@ -28,7 +28,7 @@ class RpmPkgPolicy(PkgPolicy): """Packaging policy for RPM""" # Special rpmlib python module for GBP (only) - python_rpmlib_module_name = "rpmlibgbp" + python_rpmlib_module_name = "rpm_tizen" # Do NOT use a plus '+' or a period '.' as a delimiter. # Additionally, name must begin with an alphanumeric. |