From f73acaf60b745656f8269a560d846bb8d134355b Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Mon, 31 Jan 2011 16:44:43 +0100 Subject: Add "fedpkg verify-files" command 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. --- src/pyfedpkg/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/pyfedpkg') diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index dcea285..cf5c506 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1341,6 +1341,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.""" -- cgit