for lib in list(candidates):
if not has_external_consumers(lib, old_contents, candidates):
candidates.remove(lib)
+ continue
# only preserve the lib if there is no other copy to use for each consumer
keep = False
for c in linkmap.findConsumers(lib):
for soname in providers:
if lib in providers[soname]:
for p in providers[soname]:
- if p not in candidates:
+ if p not in candidates or os.path.exists(os.path.join(srcroot, p.lstrip(os.sep))):
localkeep = False
break
break
if localkeep:
keep = True
+ if not keep:
+ candidates.remove(lib)
+ continue
del mylibs, mycontents, old_contents, liblist
def lockfile(mypath, wantnewlockfile=0, unlinkfile=0, waiting_msg=None):
"""Creates all dirs upto, the given dir. Creates a lockfile
- for the given directory as the file: directoryname+'.portage.lockfile'."""
+ for the given directory as the file: directoryname+'.portage_lockfile'."""
import fcntl
if not mypath:
unlinkfile = 0
elif wantnewlockfile:
base, tail = os.path.split(mypath)
- lockfilename = os.path.join(base, "." + tail + ".portage.lockfile")
+ lockfilename = os.path.join(base, "." + tail + ".portage_lockfile")
del base, tail
unlinkfile = 1
else: