diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-02-22 12:48:53 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-02-22 12:48:53 +0000 |
commit | f89c2bc66307995339606d20c89418144b16122d (patch) | |
tree | 0e2c31387bed64495313a7ecc5dc9bf41d8fa507 | |
parent | c316b60d59db592037c163a8c06908ac05988e5c (diff) | |
download | portage-f89c2bc66307995339606d20c89418144b16122d.tar.gz portage-f89c2bc66307995339606d20c89418144b16122d.tar.bz2 portage-f89c2bc66307995339606d20c89418144b16122d.zip |
Fix more broken commitmessagefile handling. (trunk r6032:6033)
svn path=/main/branches/2.1.2/; revision=6034
-rwxr-xr-x | bin/repoman | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/repoman b/bin/repoman index bdd04b088..67eab93a5 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1696,13 +1696,18 @@ else: # Force an unsigned commit when more than one Manifest needs to be signed. if repolevel < 3 and "sign" in repoman_settings.features: if "--pretend" in myoptions: - print "(/usr/bin/cvs -q commit -F "+commitmessagefile+")" + print "(/usr/bin/cvs -q commit -F commitmessagefile)" else: - mymsg=open(commitmessagefile,"w") + fd, commitmessagefile = tempfile.mkstemp(".repoman.msg") + mymsg = os.fdopen(fd, "w") mymsg.write(commitmessage) mymsg.write("\n (Unsigned Manifest commit)") mymsg.close() retval=os.system("/usr/bin/cvs -q commit -F "+commitmessagefile) + try: + os.unlink(commitmessagefile) + except OSError: + pass if retval: print "!!! Exiting on cvs (shell) error code:",retval sys.exit(retval) |