From 28159897d021e3e3034dfd5207fea9d020170fcf Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Mon, 12 May 2008 19:26:22 +0000 Subject: [PATCH] manually merge differences with the trunk svn path=/main/branches/prefix/; revision=10308 --- pym/portage/dbapi/vartree.py | 6 +++++- pym/portage/locks.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index ac54e75d8..540ae81c1 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1822,6 +1822,7 @@ class dblink(object): 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): @@ -1831,12 +1832,15 @@ class dblink(object): 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 diff --git a/pym/portage/locks.py b/pym/portage/locks.py index 021141234..f3e090f6b 100644 --- a/pym/portage/locks.py +++ b/pym/portage/locks.py @@ -20,7 +20,7 @@ def unlockdir(mylock): 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: @@ -37,7 +37,7 @@ def lockfile(mypath, wantnewlockfile=0, unlinkfile=0, waiting_msg=None): 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: -- 2.26.2