summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-26 02:19:42 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-26 02:19:42 +0000
commitb6f8a090878c9e58c3cf443b40e7bd668049b86b (patch)
treeaa97e0a9fe1dd31417ea53114dcaada134e9a14a
parent0e82a53ca5b96e5d05a6b8ed3c2335fd50295727 (diff)
downloadportage-b6f8a090878c9e58c3cf443b40e7bd668049b86b.tar.gz
portage-b6f8a090878c9e58c3cf443b40e7bd668049b86b.tar.bz2
portage-b6f8a090878c9e58c3cf443b40e7bd668049b86b.zip
Remove direct references to the global mtimedb from chk_updated_info_files().
svn path=/main/trunk/; revision=3661
-rwxr-xr-xbin/emerge22
1 files changed, 4 insertions, 18 deletions
diff --git a/bin/emerge b/bin/emerge
index b4ce08ccb..d75a5b603 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -26,7 +26,6 @@ sys.path = ["/usr/lib/portage/pym"]+sys.path
import portage
import emergehelp, xpak, commands, errno, re, socket, string, time, types
-from stat import ST_MTIME
from output import blue, bold, colorize, darkblue, darkgreen, darkred, green, \
havecolor, nc_len, nocolor, red, teal, turquoise, white, xtermTitle, \
xtermTitleReset, yellow
@@ -2284,23 +2283,10 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
continue
inforoot=normpath(root+z)
if os.path.isdir(inforoot):
- try:
- infomtime=os.stat(inforoot)[ST_MTIME]
- except SystemExit, e:
- raise # Needed else can't exit
- except:
- infomtime=0
-
- if not portage.mtimedb.has_key("info"):
- portage.mtimedb["info"]={}
- if portage.mtimedb["info"].has_key(inforoot):
- if portage.mtimedb["info"][inforoot]==infomtime:
- pass
- else:
- portage.mtimedb["info"][inforoot]=infomtime
+ infomtime = os.stat(inforoot).st_mtime
+ if inforoot not in prev_mtimes or \
+ prev_mtimes[inforoot] != infomtime:
regen_infodirs.append(inforoot)
- else:
- regen_infodirs.append(inforoot)
if not regen_infodirs:
print " "+green("*")+" GNU info directory index is up-to-date."
@@ -2342,7 +2328,7 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
icount=icount+1
#update mtime so we can potentially avoid regenerating.
- portage.mtimedb["info"][inforoot]=os.stat(inforoot)[ST_MTIME]
+ prev_mtimes[inforoot] = os.stat(inforoot).st_mtime
if badcount:
print " "+yellow("*")+" Processed",icount,"info files;",badcount,"errors."