summaryrefslogtreecommitdiffstats
path: root/src/pyfedpkg/__init__.py
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2011-01-31 16:44:43 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2011-02-01 16:23:52 +0100
commit357ae922fa3621b76ca5209524285d310cd869a1 (patch)
tree7bd76e62dc43329e48dd68bf323475c0e1fd7e53 /src/pyfedpkg/__init__.py
parentaa4ed2b47671786c2d651e2f0604fd18f7ab74a6 (diff)
downloadfedora-packager-5/verify-files.tar.gz
fedora-packager-5/verify-files.tar.xz
fedora-packager-5/verify-files.zip
Add "fedpkg verify-files" command5/verify-files
usage: fedpkg verify-files [-h] Locally run 'rpmbuild -bl' to verify the spec file's %files sections. This is useful after a successful run of 'fedpkg install' or after a 'fedpkg local' run which failed due to %files list inaccuracies.
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r--src/pyfedpkg/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 76b4e5d..0a1e897 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -1323,6 +1323,19 @@ class PackageModule:
_run_command(cmd, shell=True)
return
+ def verify_files(self):
+ """Run rpmbuild -bl on a module to verify the %files section"""
+
+ # Get the sources
+ sources(self.path)
+ # setup the rpm command
+ cmd = ['rpmbuild']
+ cmd.extend(self.rpmdefines)
+ cmd.extend(['-bl', os.path.join(self.path, self.spec)])
+ # Run the command
+ _run_command(cmd, shell=True)
+ return
+
def getver(self):
"""Return the version-release of a package module."""