Gentoo Archives: gentoo-commits

From: "Marius Mauch (genone)" <genone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10082 - main/trunk/pym/portage/dbapi
Date: Fri, 02 May 2008 09:28:41
Message-Id: E1JrrZG-0001N4-HP@stork.gentoo.org
1 Author: genone
2 Date: 2008-05-02 09:28:37 +0000 (Fri, 02 May 2008)
3 New Revision: 10082
4
5 Modified:
6 main/trunk/pym/portage/dbapi/vartree.py
7 Log:
8 use special symlink comparison code (original patch from prefix r9499)
9
10 Modified: main/trunk/pym/portage/dbapi/vartree.py
11 ===================================================================
12 --- main/trunk/pym/portage/dbapi/vartree.py 2008-05-02 08:20:39 UTC (rev 10081)
13 +++ main/trunk/pym/portage/dbapi/vartree.py 2008-05-02 09:28:37 UTC (rev 10082)
14 @@ -158,7 +158,7 @@
15 # insufficient field length
16 continue
17 arch = fields[0]
18 - obj = fields[1]
19 + obj = os.path.realpath(fields[1])
20 soname = fields[2]
21 path = fields[3].replace("${ORIGIN}", os.path.dirname(obj)).replace("$ORIGIN", os.path.dirname(obj)).split(":")
22 needed = fields[4].split(",")
23 @@ -1288,6 +1288,23 @@
24 plib_dict = plib_registry.getPreservedLibs()
25 for cpv in plib_dict:
26 plib_dict[cpv].sort()
27 + # for the loop below to work correctly, we need all
28 + # symlinks to come before the actual files, such that
29 + # the recorded symlinks (sonames) will be resolved into
30 + # their real target before the object is found not to be
31 + # in the reverse NEEDED map
32 + def symlink_compare(x, y):
33 + if os.path.islink(x):
34 + if os.path.islink(y):
35 + return 0
36 + else:
37 + return -1
38 + elif os.path.islink(y):
39 + return 1
40 + else:
41 + return 0
42 +
43 + plib_dict[cpv].sort(symlink_compare)
44 for f in plib_dict[cpv]:
45 if not os.path.exists(f):
46 continue
47
48 --
49 gentoo-commits@l.g.o mailing list