mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
Add more exceptions to check_deps to allow usage of icedtea.
BUG=none TEST=Ran test_image on image with icedtea Review URL: http://codereview.chromium.org/1986005
This commit is contained in:
parent
162f654c95
commit
3ab9121f97
36
check_deps
36
check_deps
@ -28,16 +28,27 @@ class CheckDependencies(object):
|
|||||||
self._verbose = verbose
|
self._verbose = verbose
|
||||||
|
|
||||||
# Insert some default directories into our library cache.
|
# Insert some default directories into our library cache.
|
||||||
# The /usr/lib/nss and /usr/lib/nspr directories are
|
libdirs = [
|
||||||
# required for understanding old-style Netscape plugins.
|
"%s/lib" % root,
|
||||||
self._ReadLibs([
|
"%s/usr/lib" % root,
|
||||||
"%s/lib" % root,
|
"%s/opt/google/o3d/lib" % root,
|
||||||
"%s/usr/local/lib" % root,
|
"%s/usr/lib/opengl/xorg-x11/lib" % root,
|
||||||
"%s/usr/lib" % root,
|
"%s/usr/local/lib/icedtea6/jre/lib/i386/client" % root,
|
||||||
"%s/usr/lib/nss" % root,
|
"%s/usr/local/lib/icedtea6/jre/lib/i386/headless" % root
|
||||||
"%s/usr/lib/nspr" % root,
|
]
|
||||||
"%s/opt/google/o3d/lib" % root
|
|
||||||
], self._libcache)
|
# Read more directories from ld.so.conf.
|
||||||
|
ld_so_conf = "%s/etc/ld.so.conf" % root
|
||||||
|
if os.path.exists(ld_so_conf):
|
||||||
|
f = file(ld_so_conf)
|
||||||
|
for line in f:
|
||||||
|
if line.startswith("/"):
|
||||||
|
path = root + line[:-1]
|
||||||
|
if os.path.exists(path):
|
||||||
|
libdirs.append(path)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
self._ReadLibs(libdirs, self._libcache)
|
||||||
|
|
||||||
def _ReadLibs(self, paths, libcache):
|
def _ReadLibs(self, paths, libcache):
|
||||||
for path in paths:
|
for path in paths:
|
||||||
@ -65,7 +76,10 @@ class CheckDependencies(object):
|
|||||||
m = _RPATH_RE.search(line)
|
m = _RPATH_RE.search(line)
|
||||||
if m:
|
if m:
|
||||||
for path in m.group(1).split(":"):
|
for path in m.group(1).split(":"):
|
||||||
rpaths.add(os.path.join(self._root, path[1:]))
|
if path.startswith("$ORIGIN"):
|
||||||
|
rpaths.add(path.replace("$ORIGIN", os.path.dirname(binary)))
|
||||||
|
else:
|
||||||
|
rpaths.add(os.path.join(self._root, path[1:]))
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
return (deps, rpaths)
|
return (deps, rpaths)
|
||||||
|
Loading…
Reference in New Issue
Block a user