Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11724 - main/trunk/pym/portage/dbapi
Date: Fri, 24 Oct 2008 20:29:01
Message-Id: E1KtTHG-0002wI-MI@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-10-24 20:28:57 +0000 (Fri, 24 Oct 2008)
3 New Revision: 11724
4
5 Modified:
6 main/trunk/pym/portage/dbapi/vartree.py
7 Log:
8 Fix preserve-libs code inside dblink.unmerge() so that it will join paths
9 correctly when ROOT != /.
10
11
12 Modified: main/trunk/pym/portage/dbapi/vartree.py
13 ===================================================================
14 --- main/trunk/pym/portage/dbapi/vartree.py 2008-10-24 00:07:21 UTC (rev 11723)
15 +++ main/trunk/pym/portage/dbapi/vartree.py 2008-10-24 20:28:57 UTC (rev 11724)
16 @@ -1935,6 +1935,8 @@
17 # their real target before the object is found not to be
18 # in the reverse NEEDED map
19 def symlink_compare(x, y):
20 + x = os.path.join(self.myroot, x.lstrip(os.path.sep))
21 + y = os.path.join(self.myroot, y.lstrip(os.path.sep))
22 if os.path.islink(x):
23 if os.path.islink(y):
24 return 0
25 @@ -1947,20 +1949,23 @@
26
27 plib_dict[cpv].sort(symlink_compare)
28 for f in plib_dict[cpv]:
29 - if not os.path.exists(f):
30 + f_abs = os.path.join(self.myroot, f.lstrip(os.path.sep))
31 + if not os.path.exists(f_abs):
32 continue
33 unlink_list = []
34 consumers = self.vartree.dbapi.linkmap.findConsumers(f)
35 if not consumers:
36 - unlink_list.append(f)
37 + unlink_list.append(f_abs)
38 else:
39 keep=False
40 for c in consumers:
41 + c = os.path.join(self.myroot,
42 + c.lstrip(os.path.sep))
43 if c not in self.getcontents():
44 keep=True
45 break
46 if not keep:
47 - unlink_list.append(f)
48 + unlink_list.append(f_abs)
49 for obj in unlink_list:
50 try:
51 if os.path.islink(obj):