From: Fabian Groffen Date: Thu, 8 May 2008 20:01:27 +0000 (-0000) Subject: try to follow the changed 'interface' of linkmap in our MachO implementation X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=3d774fbb54fc33ed9b6eae3074d4c909527912fc;p=portage.git try to follow the changed 'interface' of linkmap in our MachO implementation svn path=/main/branches/prefix/; revision=10248 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 6a9a448fe..6a641b348 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -235,13 +235,16 @@ class LinkageMapMachO(object): self._libs = {} self._obj_properties = {} - def rebuild(self): + def rebuild(self, include_file=None): libs = {} obj_properties = {} lines = [] for cpv in self._dbapi.cpv_all(): lines += grabfile(self._dbapi.getpath(cpv, filename="NEEDED.MACHO.2")) + if include_file: + lines += grabfile(include_file) + for l in lines: if l.strip() == "": continue @@ -1763,7 +1766,10 @@ class dblink(object): def _preserve_libs(self, srcroot, destroot, mycontents, counter, inforoot): # read global reverse NEEDED map linkmap = self.vartree.dbapi.linkmap - linkmap.rebuild(include_file=os.path.join(inforoot, "NEEDED.ELF.2")) + if ostype == "Darwin": + linkmap.rebuild(include_file=os.path.join(inforoot, "NEEDED.MACHO.2")) + else: + linkmap.rebuild(include_file=os.path.join(inforoot, "NEEDED.ELF.2")) liblist = linkmap.listLibraryObjects() # get list of libraries from old package instance