summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-16 01:18:54 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-16 01:18:54 +0000
commitadb0ec0ada8e82dc4d32a20c821db4edfc89be5e (patch)
tree4079325ba6b5d3598a842505091e5021d3bc0902
parentde4a53d191162b388bad3621f7568effc9c939f7 (diff)
downloadportage-adb0ec0ada8e82dc4d32a20c821db4edfc89be5e.tar.gz
portage-adb0ec0ada8e82dc4d32a20c821db4edfc89be5e.tar.bz2
portage-adb0ec0ada8e82dc4d32a20c821db4edfc89be5e.zip
Enable repoman to commit a Manifest alone instead of bailing out with "Didn't find any changed files".
svn path=/main/trunk/; revision=5661
-rwxr-xr-xbin/repoman14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/repoman b/bin/repoman
index c03d6c232..ef2ab8536 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1542,8 +1542,6 @@ else:
if isCvs:
mycvstree=cvstree.getentries("./",recursive=1)
mychanged=cvstree.findchanged(mycvstree,recursive=1,basedir="./")
- for manifest in [file for file in mychanged if '/Manifest' in file]:
- mychanged.remove(manifest)
mynew=cvstree.findnew(mycvstree,recursive=1,basedir="./")
myremoved=cvstree.findremoved(mycvstree,recursive=1,basedir="./")
if not (mychanged or mynew or myremoved):
@@ -1554,6 +1552,9 @@ else:
print
sys.exit(0)
+ # Manifests need to be regenerated after all other commits, so don't commit
+ # them now even if they have changed.
+ mychanged = [f for f in mychanged if "Manifest" != os.path.basename(f)]
myupdates=mychanged+mynew
myheaders=[]
mydirty=[]
@@ -1596,7 +1597,7 @@ else:
except AttributeError:
print "Failed to insert portage version in message!"
commitmessage+="\n(Portage version: Unknown)"
- if not commitmessagefile:
+ if myupdates:
unlinkfile=1
commitmessagefile=tempfile.mktemp(".repoman.msg")
if os.path.exists(commitmessagefile):
@@ -1653,7 +1654,7 @@ else:
else:
raise portage_exception.PortageException("!!! gpg exited with '" + str(rValue) + "' status")
- need_commit = False
+ manifest_commit_required = True
if myheaders or myupdates or myremoved or mynew:
myfiles=myheaders+myupdates+myremoved+mynew
for x in range(len(myfiles)-1, -1, -1):
@@ -1704,8 +1705,7 @@ else:
if retval:
print "!!! Exiting on cvs (shell) error code:",retval
sys.exit(retval)
- else:
- need_commit = True
+ manifest_commit_required = False
signed = False
if "sign" in repoman_settings.features:
@@ -1742,7 +1742,7 @@ else:
portage.writemsg("!!! Disabled FEATURES='sign'\n")
signed = False
- if need_commit or signed:
+ if manifest_commit_required or signed:
if "--pretend" in myoptions:
print "(/usr/bin/cvs -q commit -F "+commitmessagefile+")"
else: