From e5463313c2fbbc363080bc7443146c62618468a6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 9 Jan 2007 22:23:22 +0000 Subject: [PATCH] For bug #160971, rename dir.gz to dir.gz.old when necessary to avoid problems with install-info. Thanks to Ed Catmur for the initial patch. svn path=/main/trunk/; revision=5503 --- bin/emerge | 14 ++++++++------ 1 file 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 -- 2.26.2