repoman: never force unsigned manifest commit v2.2.0_alpha60
authorZac Medico <zmedico@gentoo.org>
Thu, 29 Sep 2011 16:48:55 +0000 (09:48 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 29 Sep 2011 16:48:55 +0000 (09:48 -0700)
This removes a special case where manifests would first be commited
without signatures for category-level or greater commits. This case
behavior wasn't very useful anyway, and would be a problem if the
unsigned manifests got rejected by a commit hook (as may happen in the
near future).

bin/repoman

index 184c5ef2cd8a00f79c77e557b45c80930a260db3..20f4b15b0eadb8870e2dbb04fb1efb75221bffd3 100755 (executable)
@@ -2557,39 +2557,6 @@ else:
                        print(red("I'm confused... I don't know where I am!"))
                        sys.exit(1)
 
-               # Force an unsigned commit when more than one Manifest needs to be signed.
-               if repolevel < 3 and sign_manifests:
-
-                       fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
-                       mymsg = os.fdopen(fd, "wb")
-                       mymsg.write(_unicode_encode(commitmessage))
-                       mymsg.write(b"\n (Unsigned Manifest commit)")
-                       mymsg.close()
-
-                       commit_cmd = [vcs]
-                       commit_cmd.extend(vcs_global_opts)
-                       commit_cmd.append("commit")
-                       commit_cmd.extend(vcs_local_opts)
-                       commit_cmd.extend(["-F", commitmessagefile])
-                       commit_cmd.extend(f.lstrip("./") for f in mymanifests)
-
-                       try:
-                               if options.pretend:
-                                       print("(%s)" % (" ".join(commit_cmd),))
-                               else:
-                                       retval = spawn(commit_cmd, env=os.environ)
-                                       if retval:
-                                               writemsg_level(("!!! Exiting on %s (shell) " + \
-                                                       "error code: %s\n") % (vcs, retval),
-                                                       level=logging.ERROR, noiselevel=-1)
-                                               sys.exit(retval)
-                       finally:
-                               try:
-                                       os.unlink(commitmessagefile)
-                               except OSError:
-                                       pass
-                       manifest_commit_required = False
-
        signed = False
        if sign_manifests:
                signed = True