diff options
author | Colin Walters <walters@verbum.org> | 2010-02-23 15:08:10 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-02-23 15:08:10 -0500 |
commit | 9ae02b4918c4e6857e2feb5dd0742415045a4a28 (patch) | |
tree | 4df545e51dd56b798df9517ed8f4391e649f9f52 | |
parent | 35e96ff0fe270e7dab7b2f9a95e607468396bd28 (diff) | |
download | fedpkg-make-pull-9ae02b4918c4e6857e2feb5dd0742415045a4a28.tar.gz fedpkg-make-pull-9ae02b4918c4e6857e2feb5dd0742415045a4a28.tar.xz fedpkg-make-pull-9ae02b4918c4e6857e2feb5dd0742415045a4a28.zip |
Various fixes, be more verbose
-rwxr-xr-x | fedpkg-make-pull | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fedpkg-make-pull b/fedpkg-make-pull index a6bc34a..a84e965 100755 --- a/fedpkg-make-pull +++ b/fedpkg-make-pull @@ -24,6 +24,7 @@ import re import urlparse import getopt import subprocess +import shutil class Vcs(object): def __init__(self, parsedurl): @@ -174,6 +175,7 @@ class Spec(object): output.write(line) for req in self._append_buildrequires: output.write('BuildRequires: %s\n' % req) + wrote_buildrequires = True else: output.write(line) @@ -269,6 +271,10 @@ def main(): if opt_srpm: tempdir_name = new_specname + '.dir' os.mkdir(tempdir_name) + # Ok, this is a gross hack...parse Source/Patch? from .spec? + for filename in os.listdir('.'): + if filename.endswith('.patch'): + shutil.copy(filename, os.path.join(tempdir_name, filename)) os.rename(snapshot_archivename, os.path.join(tempdir_name, snapshot_archivename)) os.rename(new_specname, os.path.join(tempdir_name, targetspec)) subprocess.check_call(['rpmbuild', '--nodeps', @@ -280,9 +286,7 @@ def main(): '-bs', targetspec], cwd=tempdir_name) srpm_name = filter(lambda x: x.endswith('.src.rpm'), os.listdir(tempdir_name))[0] os.rename(os.path.join(tempdir_name, srpm_name), srpm_name) - os.unlink(os.path.join(tempdir_name, snapshot_archivename)) - os.unlink(os.path.join(tempdir_name, targetspec)) - os.rmdir(tempdir_name) + shutil.rmtree(tempdir_name) print "Created SRPM: %s" % (srpm_name, ) elif opt_apply: os.rename(new_specname, targetspec) |