diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-01-09 22:23:22 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-01-09 22:23:22 +0000 |
commit | e5463313c2fbbc363080bc7443146c62618468a6 (patch) | |
tree | 331f88ccafc7f8a88ee495836fa2cec829a064e3 | |
parent | 7bd12272120465a6ccc80a2281b6333f7d3a5425 (diff) | |
download | portage-e5463313c2fbbc363080bc7443146c62618468a6.tar.gz portage-e5463313c2fbbc363080bc7443146c62618468a6.tar.bz2 portage-e5463313c2fbbc363080bc7443146c62618468a6.zip |
For bug #160971, rename dir.gz to dir.gz.old when necessary to avoid problems with install-info. Thanks to Ed Catmur <ed@catmur.co.uk> for the initial patch.
svn path=/main/trunk/; revision=5503
-rwxr-xr-x | bin/emerge | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/emerge b/bin/emerge index 3132b814c..7bb2fc5d4 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3462,12 +3462,14 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval): for inforoot in regen_infodirs: if inforoot=='': continue - try: - os.rename(inforoot+"/dir",inforoot+"/dir.old") - except SystemExit, e: - raise # Needed else can't exit - except: - pass + for filename in ("dir", "dir.gz"): + file_path = os.path.join(inforoot, filename) + try: + os.rename(file_path, file_path + ".old") + except OSError, e: + if e.errno != errno.ENOENT: + raise + del e if not os.path.isdir(inforoot): continue |