Make repoman commit removals together with the other changes (instead of with the...
authorZac Medico <zmedico@gentoo.org>
Tue, 16 Jan 2007 02:19:10 +0000 (02:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 16 Jan 2007 02:19:10 +0000 (02:19 -0000)
svn path=/main/trunk/; revision=5666

bin/repoman

index ef2ab8536a796bac89cacb3f182adde4c8006daf..6db67a16d68629e5842128edef9b477a1967261d 100755 (executable)
@@ -40,6 +40,7 @@ import codecs
 
 from portage_manifest import Manifest
 from portage_exception import ParseError
+from portage_exec import spawn
 
 from output import bold, darkgreen, darkred, green, nocolor, red, turquoise, yellow
 
@@ -1597,7 +1598,8 @@ else:
        except AttributeError:
                print "Failed to insert portage version in message!"
                commitmessage+="\n(Portage version: Unknown)"
-       if myupdates:
+       if myupdates or myremoved:
+               myfiles = myupdates + myremoved
                unlinkfile=1
                commitmessagefile=tempfile.mktemp(".repoman.msg")
                if os.path.exists(commitmessagefile):
@@ -1615,9 +1617,12 @@ else:
 
                retval = None
                if "--pretend" in myoptions:
-                       print "(/usr/bin/cvs -q commit -F "+ commitmessagefile +" "+ " ".join(myupdates)+")"
+                       print "(/usr/bin/cvs -q commit -F %s %s)" % \
+                               (commitmessagefile, " ".join(myfiles))
                else:
-                       retval=os.system("/usr/bin/cvs -q commit -F "+ commitmessagefile + " " +" ".join(myupdates))
+                       retval = spawn(["/usr/bin/cvs", "-q", "commit",
+                               "-F", commitmessagefile] + myfiles,
+                               env=repoman_settings.environ())
                        if retval:
                                print "!!! Exiting on cvs (shell) error code:",retval
                                sys.exit(retval)