From: Fabian Groffen Date: Sat, 14 May 2011 13:22:16 +0000 (+0200) Subject: Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d4af3319a7a1ec617498252f3d345622759df5be;p=portage.git Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix Conflicts: pym/portage/util/_dyn_libs/LinkageMapELF.py --- d4af3319a7a1ec617498252f3d345622759df5be diff --cc pym/_emerge/actions.py index 1672d4753,215203a2f..80d872d2c --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@@ -28,10 -28,11 +28,11 @@@ from portage import o from portage import digraph from portage import _unicode_decode from portage.cache.cache_errors import CacheError -from portage.const import GLOBAL_CONFIG_PATH, NEWS_LIB_PATH +from portage.const import GLOBAL_CONFIG_PATH, NEWS_LIB_PATH, EPREFIX from portage.const import _ENABLE_DYN_LINK_MAP, _ENABLE_SET_CONFIG from portage.dbapi.dep_expand import dep_expand - from portage.dep import Atom, extended_cp_match, _get_useflag_re + from portage.dbapi._expand_new_virt import expand_new_virt + from portage.dep import Atom, extended_cp_match from portage.exception import InvalidAtom from portage.output import blue, bold, colorize, create_color_func, darkgreen, \ red, yellow diff --cc pym/portage/const.py index 7df2ecbd9,98f3dac6d..605752000 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@@ -132,13 -88,13 +132,14 @@@ EBUILD_PHASES = ("pretend", SUPPORTED_FEATURES = frozenset([ "assume-digests", "binpkg-logs", "buildpkg", "buildsyspkg", "candy", "ccache", "chflags", "collision-protect", "compress-build-logs", - "digest", "distcc", "distlocks", "fakeroot", + "digest", "distcc", "distlocks", "ebuild-locks", "fakeroot", "fail-clean", "fixpackages", "force-mirror", "getbinpkg", "installsources", "keeptemp", "keepwork", "fixlafiles", "lmirror", + "macossandbox", "macosprefixsandbox", "macosusersandbox", "metadata-transfer", "mirror", "multilib-strict", "news", - "noauto", "noclean", "nodoc", "noinfo", "noman", "nostrip", - "notitles", "parallel-fetch", "parse-eapi-ebuild-head", + "noauto", "noclean", "nodoc", "noinfo", "noman", + "nostrip", "notitles", "parallel-fetch", "parallel-install", + "parse-eapi-ebuild-head", "prelink-checksums", "preserve-libs", "protect-owned", "python-trace", "sandbox", "selinux", "sesandbox", "severe", "sfperms", diff --cc pym/portage/dbapi/vartree.py index b88fbe5bb,cdae34077..581300fc5 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@@ -162,19 -163,11 +167,21 @@@ class vardbapi(dbapi) self._linkmap = None if _ENABLE_DYN_LINK_MAP: - self._linkmap = LinkageMap(self) + chost = self.settings.get('CHOST') + if not chost: + chost = 'lunix?' # this happens when profiles are not available + if chost.find('darwin') >= 0: + self._linkmap = LinkageMapMachO(self) + elif chost.find('interix') >= 0 or chost.find('winnt') >= 0: + self._linkmap = LinkageMapPeCoff(self) + elif chost.find('aix') >= 0: + self._linkmap = LinkageMapXCoff(self) + else: + self._linkmap = LinkageMap(self) self._owners = self._owners_db(self) + self._cached_counter = None + def getpath(self, mykey, filename=None): # This is an optimized hotspot, so don't use unicode-wrapped # os module and don't use os.path.join(). diff --cc pym/portage/util/_dyn_libs/LinkageMapELF.py index b9c022ff1,fe86a7a89..73b775288 --- a/pym/portage/util/_dyn_libs/LinkageMapELF.py +++ b/pym/portage/util/_dyn_libs/LinkageMapELF.py @@@ -179,12 -199,24 +200,24 @@@ class LinkageMapELF(object) # have to call scanelf for preserved libs here as they aren't # registered in NEEDED.ELF.2 files plibs = set() - if self._dbapi._plib_registry and self._dbapi._plib_registry.getPreservedLibs(): - args = [EPREFIX + "/usr/bin/scanelf", "-qF", "%a;%F;%S;%r;%n"] - for items in self._dbapi._plib_registry.getPreservedLibs().values(): + if preserve_paths is not None: + plibs.update(preserve_paths) + if self._dbapi._plib_registry and \ + self._dbapi._plib_registry.hasEntries(): + for cpv, items in \ + self._dbapi._plib_registry.getPreservedLibs().items(): + if exclude_pkgs is not None and cpv in exclude_pkgs: + # These preserved libs will either be unmerged, + # rendering them irrelevant, or they will be + # preserved in the replacement package and are + # already represented via the preserve_paths + # parameter. + continue plibs.update(items) - args.extend(os.path.join(root, x.lstrip("." + os.sep)) \ - for x in items) + if plibs: - args = ["/usr/bin/scanelf", "-qF", "%a;%F;%S;%r;%n"] ++ args = [EPREFIX + "/usr/bin/scanelf", "-qF", "%a;%F;%S;%r;%n"] + args.extend(os.path.join(root, x.lstrip("." + os.sep)) \ + for x in plibs) try: proc = subprocess.Popen(args, stdout=subprocess.PIPE) except EnvironmentError as e: