From: Fabian Groffen Date: Sun, 13 Apr 2008 08:12:26 +0000 (-0000) Subject: - use EPREFIX_LSTRIP constant instead of dynamic EPREFIX.lstrip(os.path.sep) X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=656a8d22ebdabff4f2cbb3e6068fbed3cfcb846d;p=portage.git - use EPREFIX_LSTRIP constant instead of dynamic EPREFIX.lstrip(os.path.sep) - avoid bug #217481 from happening, but don't fix it for real by ignoring host-provided stuff on Darwin in this case, we also ignore the Carbon Framework which preserve-libs tries to preserve, basically because it selects its targets wrongly. svn path=/main/branches/prefix/; revision=9867 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index cc1db12fb..269468224 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -4,7 +4,7 @@ from portage.checksum import perform_md5 from portage.const import CACHE_PATH, CONFIG_MEMORY_FILE, PORTAGE_BIN_PATH, \ - PRIVATE_PATH, VDB_PATH, EPREFIX + PRIVATE_PATH, VDB_PATH, EPREFIX, EPREFIX_LSTRIP from portage.data import portage_gid, portage_uid, secpass from portage.dbapi import dbapi from portage.dep import dep_getslot, use_reduce, paren_reduce, isvalidatom, \ @@ -157,6 +157,14 @@ class LibraryPackageMap(object): continue libs = mysplit[1].split(",") for lib in libs: + # In Prefix we can't do anything about host provided + # libs, it also makes little sense to try and + # preserve them, so filter them out here. See below + # why we can detect this in certain cases. + if '/' in lib: + if not lib.startswith(EPREFIX): + continue + # The contract says we only have basenames in the # keys of the reverse map (as that is the only thing # available on Linux/ELF) and the code calling this @@ -2113,7 +2121,7 @@ class dblink(object): # we do a first merge; this will recurse through all files in our srcroot but also build up a # "second hand" of symlinks to merge later - if self.mergeme(srcroot, destroot, outfile, secondhand, EPREFIX.lstrip(os.path.sep), cfgfiledict, mymtime): + if self.mergeme(srcroot, destroot, outfile, secondhand, EPREFIX_LSTRIP, cfgfiledict, mymtime): return 1 # now, it's time for dealing our second hand; we'll loop until we can't merge anymore. The rest are