projects
/
tools
/
git-buildpackage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a245ef6
)
rpm: Implemented parse_spec function
author
Ed Bartosh
<eduard.bartosh@intel.com>
Fri, 20 Apr 2012 02:06:56 +0000
(
05:06
+0300)
committer
Ed Bartosh
<eduard.bartosh@intel.com>
Tue, 8 May 2012 12:31:04 +0000
(15:31 +0300)
gbp/rpm/__init__.py
patch
|
blob
|
history
diff --git
a/gbp/rpm/__init__.py
b/gbp/rpm/__init__.py
index e29c694fe9d56842117b1d6538d1d70b4d477777..f8eee39c0db9144ce42d2d07c3e8fee9ed7c007b 100644
(file)
--- a/
gbp/rpm/__init__.py
+++ b/
gbp/rpm/__init__.py
@@
-466,6
+466,15
@@
def parse_srpm(srpmfile):
return srcrpm
+def parse_spec(specfile):
+ try:
+ return SpecFile(specfile)
+ except IOError, err:
+ raise GbpError, "Error reading spec file: %s" % err
+ except NoSpecError, err:
+ raise GbpError, "RPM error while parsing spec: %s" % err
+
+
def find_files(topdir, filespec='*', recursive=True):
"""find spec files in given dir"""
cmd = 'find -L %s' % topdir