Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11745 - main/branches/prefix/pym/portage/dbapi
Date: Wed, 29 Oct 2008 20:15:32
Message-Id: E1KvHRx-0002qX-16@stork.gentoo.org
1 Author: grobian
2 Date: 2008-10-29 20:15:28 +0000 (Wed, 29 Oct 2008)
3 New Revision: 11745
4
5 Modified:
6 main/branches/prefix/pym/portage/dbapi/vartree.py
7 Log:
8 Apply LinkageMap changes to LinkageMapMachO, make sure we call rebuild correctly
9
10 Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
11 ===================================================================
12 --- main/branches/prefix/pym/portage/dbapi/vartree.py 2008-10-29 20:02:41 UTC (rev 11744)
13 +++ main/branches/prefix/pym/portage/dbapi/vartree.py 2008-10-29 20:15:28 UTC (rev 11745)
14 @@ -679,13 +679,15 @@
15 """
16 return isinstance(self._key, tuple)
17
18 - def rebuild(self, include_file=None):
19 + def rebuild(self, exclude_pkgs=None, include_file=None):
20 root = self._root
21 libs = {}
22 obj_key_cache = {}
23 obj_properties = {}
24 lines = []
25 for cpv in self._dbapi.cpv_all():
26 + if exclude_pkgs is not None and cpv in exclude_pkgs:
27 + continue
28 lines += self._dbapi.aux_get(cpv, ["NEEDED.MACHO.3"])[0].split('\n')
29 # Cache NEEDED.* files avoid doing excessive IO for every rebuild.
30 self._dbapi.flush_cache()
31 @@ -2878,9 +2880,10 @@
32 # read global reverse NEEDED map
33 linkmap = self.vartree.dbapi.linkmap
34 if ostype == "Darwin":
35 - linkmap.rebuild(include_file=os.path.join(inforoot, "NEEDED.MACHO.3"))
36 + neededfile = "NEEDED.MACHO.3"
37 else:
38 - linkmap.rebuild(include_file=os.path.join(inforoot, "NEEDED.ELF.2"))
39 + neededfile = "NEEDED.ELF.2"
40 + linkmap.rebuild(include_file=os.path.join(inforoot, neededfile))
41 liblist = linkmap.listLibraryObjects()
42
43 # get list of libraries from old package instance
44 @@ -3574,8 +3577,12 @@
45 writedict(cfgfiledict, conf_mem_file)
46
47 exclude_pkgs = set(dblnk.mycpv for dblnk in others_in_slot)
48 + if ostype == "Darwin":
49 + neededfile = "NEEDED.MACHO.3"
50 + else:
51 + neededfile = "NEEDED.ELF.2"
52 self.vartree.dbapi.linkmap.rebuild(exclude_pkgs=exclude_pkgs,
53 - include_file=os.path.join(inforoot, "NEEDED.ELF.2"))
54 + include_file=os.path.join(inforoot, neededfile))
55
56 # These caches are populated during collision-protect and the data
57 # they contain is now invalid. It's very important to invalidate