From 389247e623deacccc62c0d295e0b144911e1d9d8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 24 Feb 2010 14:44:54 -0500 Subject: [fedpkg-pull-build-chain] Adjust to new fedpkg-make-pull --- fedpkg-pull-build-chain | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'fedpkg-pull-build-chain') diff --git a/fedpkg-pull-build-chain b/fedpkg-pull-build-chain index 37d14e1..18a75d0 100755 --- a/fedpkg-pull-build-chain +++ b/fedpkg-pull-build-chain @@ -89,7 +89,6 @@ def main(): if filename.endswith('.src.rpm'): print "Deleting old srpm: " + fpath os.unlink(fpath) - mock_resultdir = os.path.join('_build', arg) try: @@ -108,7 +107,7 @@ def main(): last_build_succeeded = False print "Running fedpkg-make-pull" - args = ['fedpkg-make-pull'] + args = ['fedpkg-make-pull', '--status-file=pull-status'] if force or not last_build_succeeded: args.append('--force') try: @@ -117,15 +116,23 @@ def main(): print "Failed: " + unicode(e) failed.append(arg) continue + + f = open('pull-status') + was_updated = f.readline() == 'updated' + f.close() + + if not was_updated and last_build_succeeded: + print "No updates and have a previous successful build, nothing to do" + continue srpm = None for filename in os.listdir(release_dir): fpath = os.path.join(release_dir, filename) if filename.endswith('.src.rpm'): srpm = fpath - if srpm is None and last_build_succeeded: - print "No updates and have a previous successful build, nothing to do" - continue + if not srpm: + print "Error: Couldn't find .src.rpm!" + sys.exit(1) current_failed = False for mockrelease in mockreleases: -- cgit