summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-02-24 14:24:31 -0500
committerColin Walters <walters@verbum.org>2010-02-24 14:24:31 -0500
commita5c97e7fd2ac95112b2777cc08f0b8b783ba5cda (patch)
tree5d5104fd6534f4d214bedf133746986966e9f570
parent4fdc0c718435f0c9a0989ace44683cf828157439 (diff)
downloadfedpkg-make-pull-a5c97e7fd2ac95112b2777cc08f0b8b783ba5cda.tar.gz
fedpkg-make-pull-a5c97e7fd2ac95112b2777cc08f0b8b783ba5cda.tar.xz
fedpkg-make-pull-a5c97e7fd2ac95112b2777cc08f0b8b783ba5cda.zip
[fedpkg-make-pull] Just default to overwriting .spec and sources
-rwxr-xr-xfedpkg-make-pull26
1 files changed, 15 insertions, 11 deletions
diff --git a/fedpkg-make-pull b/fedpkg-make-pull
index 6f24eb1..026a053 100755
--- a/fedpkg-make-pull
+++ b/fedpkg-make-pull
@@ -219,7 +219,7 @@ class Spec(object):
def main():
try:
- opts, args = getopt.getopt(sys.argv[1:], 'f', ['force', 'apply', 'srpm'])
+ opts, args = getopt.getopt(sys.argv[1:], 'f', ['force', 'status-file='])
except getopt.GetoptError, e:
print unicode(e)
print ""
@@ -227,14 +227,12 @@ def main():
sys.exit(1)
force = False
- opt_apply = False
- opt_srpm = True
+ opt_statusfile = None
for o, a in opts:
if o in ('-f', '--force'):
force = True
- elif o in ('--apply', ):
- opt_apply = True
- opt_srpm = False
+ elif o in ('--status-file', ):
+ opt_statusfile = a
targetspec = None
for filename in os.listdir('.'):
@@ -272,6 +270,10 @@ def main():
newid = vcs.get_id(targetdir)
if oldid == newid and not force:
print "No changes upstream"
+ if opt_statusfile is not None:
+ f = open(opt_statusfile, 'w')
+ f.write('unchanged')
+ f.close()
sys.exit(0)
else:
print "Checking out from %r into new directory %r" % (vcsurl, targetdir)
@@ -295,7 +297,7 @@ def main():
spec.increment_release_snapshot(newid)
spec.save(new_specname)
- if opt_srpm and not opt_apply:
+ if False: # This stuff is buggy...
tempdir_name = new_specname + '.dir'
os.mkdir(tempdir_name)
# Ok, this is a gross hack...parse Source/Patch? from .spec?
@@ -315,7 +317,7 @@ def main():
os.rename(os.path.join(tempdir_name, srpm_name), srpm_name)
shutil.rmtree(tempdir_name)
print "Created SRPM: %s" % (srpm_name, )
- elif opt_apply:
+ elif True:
os.rename(new_specname, targetspec)
snapshot_md5 = hashlib.md5()
@@ -339,9 +341,11 @@ def main():
print "If you want to upload to Fedora, you'll need to run:"
print " make upload FILE=%s" % (snapshot_archivename, )
print " cvs commit && make tag build"
-
- if opt_srpm:
- check_call_verbose(['make', 'srpm'])
+ if opt_statusfile is not None:
+ f = open(opt_statusfile, 'w')
+ f.write('updated')
+ f.close()
+
sys.exit(0)
if __name__ == '__main__':