summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2008-06-08 19:01:17 +0000
committerMarius Mauch <genone@gentoo.org>2008-06-08 19:01:17 +0000
commit1dd22e980db952be5edfae0cd864bfd0925c547b (patch)
tree51bce414240c566e1a80fcb007ec78714ece25fb /pym
parentd15e561fcc241b4a26a56b08c43594cae0c7e849 (diff)
downloadportage-1dd22e980db952be5edfae0cd864bfd0925c547b.tar.gz
portage-1dd22e980db952be5edfae0cd864bfd0925c547b.tar.bz2
portage-1dd22e980db952be5edfae0cd864bfd0925c547b.zip
make sure that scanelf is called with the right paths, and properly register all preserved objects to fix bug #223591
svn path=/main/trunk/; revision=10607
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index cb2fe28ba..f2593be62 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -147,9 +147,9 @@ class LinkageMap(object):
# have to call scanelf for preserved libs here as they aren't
# registered in NEEDED.ELF.2 files
if self._dbapi.plib_registry and self._dbapi.plib_registry.getPreservedLibs():
- args = ["/usr/bin/scanelf", "-yqF", "%a;%F;%S;%r;%n"]
+ args = ["/usr/bin/scanelf", "-qF", "%a;%F;%S;%r;%n"]
for items in self._dbapi.plib_registry.getPreservedLibs().values():
- args += items
+ args += [x.lstrip(".") for x in items]
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
output = [l[3:] for l in proc.communicate()[0].split("\n")]
lines += output
@@ -1812,18 +1812,16 @@ class dblink(object):
# inject files that should be preserved into our image dir
import shutil
- missing_paths = []
+ preserve_paths = []
candidates_stack = list(candidates)
while candidates_stack:
x = candidates_stack.pop()
# skip existing files so the 'new' libs aren't overwritten
if os.path.exists(os.path.join(srcroot, x.lstrip(os.sep))):
- missing_paths.append(x)
continue
print "injecting %s into %s" % (x, srcroot)
if not os.path.exists(os.path.join(destroot, x.lstrip(os.sep))):
print "%s does not exist so can't be preserved" % x
- missing_paths.append(x)
continue
mydir = os.path.join(srcroot, os.path.dirname(x).lstrip(os.sep))
if not os.path.exists(mydir):
@@ -1842,10 +1840,9 @@ class dblink(object):
else:
shutil.copy2(os.path.join(destroot, x.lstrip(os.sep)),
os.path.join(srcroot, x.lstrip(os.sep)))
-
- preserve_paths = [x for x in candidates if x not in missing_paths]
-
- del missing_paths, candidates
+ preserve_paths.append(x)
+
+ del candidates
# keep track of the libs we preserved
self.vartree.dbapi.plib_registry.register(self.mycpv, self.settings["SLOT"], counter, preserve_paths)