Gentoo Archives: gentoo-commits

From: "Marius Mauch (genone)" <genone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9277 - in main/trunk/pym/portage: . dbapi
Date: Tue, 05 Feb 2008 21:29:19
Message-Id: E1JMVLv-0000aE-VN@stork.gentoo.org
1 Author: genone
2 Date: 2008-02-05 21:29:15 +0000 (Tue, 05 Feb 2008)
3 New Revision: 9277
4
5 Modified:
6 main/trunk/pym/portage/dbapi/vartree.py
7 main/trunk/pym/portage/util.py
8 Log:
9 don't try to copy manually removed libraries (bug #208946)
10
11 Modified: main/trunk/pym/portage/dbapi/vartree.py
12 ===================================================================
13 --- main/trunk/pym/portage/dbapi/vartree.py 2008-02-05 19:02:24 UTC (rev 9276)
14 +++ main/trunk/pym/portage/dbapi/vartree.py 2008-02-05 21:29:15 UTC (rev 9277)
15 @@ -1594,11 +1594,16 @@
16 # get the real paths for the libs
17 preserve_paths = [x for x in old_contents if os.path.basename(x) in preserve_libs]
18 del old_contents, old_libs, mylibs, preserve_libs
19 -
20 +
21 # inject files that should be preserved into our image dir
22 import shutil
23 + missing_paths = []
24 for x in preserve_paths:
25 print "injecting %s into %s" % (x, srcroot)
26 + if not os.path.exists(os.path.join(destroot, x.lstrip(os.sep))):
27 + print "%s does not exist so can't be preserved"
28 + missing_paths.append(x)
29 + continue
30 mydir = os.path.join(srcroot, os.path.dirname(x).lstrip(os.sep))
31 if not os.path.exists(mydir):
32 os.makedirs(mydir)
33 @@ -1616,6 +1621,10 @@
34 shutil.copy2(os.path.join(destroot, x.lstrip(os.sep)),
35 os.path.join(srcroot, x.lstrip(os.sep)))
36
37 + preserve_paths = [x for x in preserve_paths if x not in missing_paths]
38 +
39 + del missing_paths
40 +
41 # keep track of the libs we preserved
42 self.vartree.dbapi.plib_registry.register(self.mycpv, self.settings["SLOT"], counter, preserve_paths)
43
44
45 Modified: main/trunk/pym/portage/util.py
46 ===================================================================
47 --- main/trunk/pym/portage/util.py 2008-02-05 19:02:24 UTC (rev 9276)
48 +++ main/trunk/pym/portage/util.py 2008-02-05 21:29:15 UTC (rev 9277)
49 @@ -1058,3 +1058,17 @@
50 os.path.join(real_dirname, last_pfile)) == newmd5:
51 return old_pfile
52 return new_pfile
53 +
54 +def getlibpaths():
55 + """ Return a list of paths that are used for library lookups """
56 +
57 + # the following is based on the information from ld.so(8)
58 + rval = os.environ.get("LD_LIBRARY_PATH", "").split(":")
59 + rval.extend(grabfile("/etc/ld.so.conf"))
60 + rval.append("/usr/lib")
61 + rval.append("/lib")
62 +
63 + rval = [normalize_path(x) for x in rval if x != ""]
64 +
65 + return rval
66 +
67
68 --
69 gentoo-commits@l.g.o mailing list