diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-30 06:56:23 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-30 06:56:23 +0000 |
commit | b0951e137a54f7bb36d4a72cf8bae71989666e74 (patch) | |
tree | 9f46121cd6485c8fc4f22c4ddbdd72c4ca36d28c /bin/repoman | |
parent | 4d76761897bc60bab7796c0253a479c62664f196 (diff) | |
download | portage-b0951e137a54f7bb36d4a72cf8bae71989666e74.tar.gz portage-b0951e137a54f7bb36d4a72cf8bae71989666e74.tar.bz2 portage-b0951e137a54f7bb36d4a72cf8bae71989666e74.zip |
For bug #169500, detect when the cvs server puts /Attic/ inside the path and automatically correct it. (branches/2.1.2 r7341)
svn path=/main/branches/2.1.2.9/; revision=7504
Diffstat (limited to 'bin/repoman')
-rwxr-xr-x | bin/repoman | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman index cbc823458..62129e802 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1752,6 +1752,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 |