summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-21 11:36:20 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-21 11:36:20 +0000
commit5124590574eee1654ab4c0c49c3e739f7e1675bd (patch)
tree4bfbf67dfc5fa15f1b2458f6b6aa5797e78d405f /bin
parentfbc990f92e413693648564d789e9523376cb4c0f (diff)
downloadportage-5124590574eee1654ab4c0c49c3e739f7e1675bd.tar.gz
portage-5124590574eee1654ab4c0c49c3e739f7e1675bd.tar.bz2
portage-5124590574eee1654ab4c0c49c3e739f7e1675bd.zip
For bug #169500, detect when the cvs server puts /Attic/ inside the $Header path and automatically correct it. (trunk r7340)
svn path=/main/branches/2.1.2/; revision=7341
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index b68d3c99a..081c8b021 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1790,6 +1790,23 @@ else:
else:
raise portage_exception.PortageException("!!! gpg exited with '" + str(rValue) + "' status")
+ # When files are removed and re-added, the cvs server will put /Attic/
+ # inside the $Header path. This code detects the problem and corrects it
+ # so that the Manifest will generate correctly. See bug #169500.
+ from portage_util import write_atomic
+ cvs_header = re.compile(r'^#\s*\$Header.*\$$')
+ for x in myheaders:
+ f = open(x)
+ mylines = f.readlines()
+ f.close()
+ modified = False
+ for i, line in enumerate(mylines):
+ if cvs_header.match(line) and "/Attic/" in line:
+ mylines[i] = line.replace("/Attic/", "/")
+ modified = True
+ if modified:
+ write_atomic(x, "".join(mylines))
+
manifest_commit_required = True
if myheaders or myupdates or myremoved or mynew:
myfiles=myheaders+myupdates+myremoved+mynew