Index: portage-2.0.51.22/pym/portage.py =================================================================== --- portage-2.0.51.22.orig/pym/portage.py +++ portage-2.0.51.22/pym/portage.py @@ -6144,8 +6144,8 @@ class dblink: mydirs=[] mysyms=[] modprotect="/lib/modules/" - for obj in mykeys: - obj=os.path.normpath(obj) + for objkey in mykeys: + obj=os.path.normpath(objkey) if obj[:2]=="//": obj=obj[1:] if not os.path.exists(obj): @@ -6153,7 +6153,7 @@ class dblink: #we skip this if we're dealing with a symlink #because os.path.exists() will operate on the #link target rather than the link itself. - print "--- !found "+str(pkgfiles[obj][0]), obj + print "--- !found "+str(pkgfiles[objkey][0]), obj continue # next line includes a tweak to protect modules from being unmerged, # but we don't protect modules from being overwritten if they are @@ -6161,26 +6161,26 @@ class dblink: # functionality for /lib/modules. For portage-ng both capabilities # should be able to be independently specified. if self.isprotected(obj) or ((len(obj) > len(modprotect)) and (obj[0:len(modprotect)]==modprotect)): - print "--- cfgpro "+str(pkgfiles[obj][0]), obj + print "--- cfgpro "+str(pkgfiles[objkey][0]), obj continue lstatobj=os.lstat(obj) lmtime=str(lstatobj[stat.ST_MTIME]) - if (pkgfiles[obj][0] not in ("dir","fif","dev","sym")) and (lmtime != pkgfiles[obj][1]): - print "--- !mtime", pkgfiles[obj][0], obj + if (pkgfiles[objkey][0] not in ("dir","fif","dev","sym")) and (lmtime != pkgfiles[objkey][1]): + print "--- !mtime", pkgfiles[objkey][0], obj continue - if pkgfiles[obj][0]=="dir": + if pkgfiles[objkey][0]=="dir": if not os.path.isdir(obj): print "--- !dir ","dir", obj continue mydirs.append(obj) - elif pkgfiles[obj][0]=="sym": + elif pkgfiles[objkey][0]=="sym": if not os.path.islink(obj): print "--- !sym ","sym", obj continue mysyms.append(obj) - elif pkgfiles[obj][0]=="obj": + elif pkgfiles[objkey][0]=="obj": if not os.path.isfile(obj): print "--- !obj ","obj", obj continue @@ -6188,7 +6188,7 @@ class dblink: # string.lower is needed because db entries used to be in upper-case. The # string.lower allows for backwards compatibility. - if mymd5 != string.lower(pkgfiles[obj][2]): + if mymd5 != string.lower(pkgfiles[objkey][2]): print "--- !md5 ","obj", obj continue try: @@ -6196,7 +6196,7 @@ class dblink: except (OSError,IOError),e: pass print "<<< ","obj",obj - elif pkgfiles[obj][0]=="fif": + elif pkgfiles[objkey][0]=="fif": if not stat.S_ISFIFO(lstatobj[stat.ST_MODE]): print "--- !fif ","fif", obj continue @@ -6205,7 +6205,7 @@ class dblink: except (OSError,IOError),e: pass print "<<< ","fif",obj - elif pkgfiles[obj][0]=="dev": + elif pkgfiles[objkey][0]=="dev": print "--- ","dev",obj #Now, we need to remove symlinks and directories. We'll repeatedly