diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-23 13:11:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-23 13:11:08 +0000 |
commit | d991c870472a1de90ee56aa0b31cc5d2d390e562 (patch) | |
tree | 485324cdfc824b9ab7eb7044229a7913f1ca3a46 /pym/dispatch_conf.py | |
parent | 7cd90408efd0ccf9727037233dfa1266f57d48d2 (diff) | |
download | portage-d991c870472a1de90ee56aa0b31cc5d2d390e562.tar.gz portage-d991c870472a1de90ee56aa0b31cc5d2d390e562.tar.bz2 portage-d991c870472a1de90ee56aa0b31cc5d2d390e562.zip |
Revert r6968 since shutil.move() is broken internally.
svn path=/main/branches/2.1.2/; revision=6971
Diffstat (limited to 'pym/dispatch_conf.py')
-rw-r--r-- | pym/dispatch_conf.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pym/dispatch_conf.py b/pym/dispatch_conf.py index 6df0146d5..690772bf8 100644 --- a/pym/dispatch_conf.py +++ b/pym/dispatch_conf.py @@ -7,7 +7,7 @@ # Library by Wayne Davison <gentoo@blorf.net>, derived from code # written by Jeremy Wohl (http://igmus.org) -from stat import ST_GID, ST_MODE, ST_UID +from stat import * import os, sys, commands, shutil import portage @@ -72,7 +72,7 @@ def rcs_archive(archive, curconf, newconf, mrgconf): os.system(RCS_GET + ' -r' + RCS_BRANCH + ' ' + archive) has_branch = os.path.exists(archive) if has_branch: - shutil.move(archive, archive + '.dist') + os.rename(archive, archive + '.dist') try: shutil.copy2(newconf, archive) @@ -87,7 +87,7 @@ def rcs_archive(archive, curconf, newconf, mrgconf): mystat = os.lstat(newconf) os.chmod(mrgconf, mystat[ST_MODE]) os.chown(mrgconf, mystat[ST_UID], mystat[ST_GID]) - shutil.move(archive, archive + '.dist.new') + os.rename(archive, archive + '.dist.new') return ret @@ -112,10 +112,10 @@ def file_archive(archive, curconf, newconf, mrgconf): suf += 1 while suf > 1: - shutil.move(archive + '.' + str(suf-1), archive + '.' + str(suf)) + os.rename(archive + '.' + str(suf-1), archive + '.' + str(suf)) suf -= 1 - shutil.move(archive, archive + '.1') + os.rename(archive, archive + '.1') try: shutil.copy2(curconf, archive) @@ -145,7 +145,7 @@ def file_archive(archive, curconf, newconf, mrgconf): def rcs_archive_post_process(archive): """Check in the archive file with the .dist.new suffix on the branch and remove the one with the .dist suffix.""" - shutil.move(archive + '.dist.new', archive) + os.rename(archive + '.dist.new', archive) if os.path.exists(archive + '.dist'): # Commit the last-distributed version onto the branch. os.system(RCS_LOCK + RCS_BRANCH + ' ' + archive) @@ -158,4 +158,4 @@ def rcs_archive_post_process(archive): def file_archive_post_process(archive): """Rename the archive file with the .dist.new suffix to a .dist suffix""" - shutil.move(archive + '.dist.new', archive + '.dist') + os.rename(archive + '.dist.new', archive + '.dist') |