diff options
Diffstat (limited to '')
-rwxr-xr-x | linden/scripts/install.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/linden/scripts/install.py b/linden/scripts/install.py index 1db9bb3..931968a 100755 --- a/linden/scripts/install.py +++ b/linden/scripts/install.py | |||
@@ -35,6 +35,7 @@ $/LicenseInfo$ | |||
35 | 35 | ||
36 | import sys | 36 | import sys |
37 | import os.path | 37 | import os.path |
38 | import re | ||
38 | 39 | ||
39 | # Look for indra/lib/python in all possible parent directories ... | 40 | # Look for indra/lib/python in all possible parent directories ... |
40 | # This is an improvement over the setup-path.py method used previously: | 41 | # This is an improvement over the setup-path.py method used previously: |
@@ -563,6 +564,29 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package""" | |||
563 | tar.extractall(path=install_dir) | 564 | tar.extractall(path=install_dir) |
564 | except AttributeError: | 565 | except AttributeError: |
565 | _extractall(tar, path=install_dir) | 566 | _extractall(tar, path=install_dir) |
567 | if _get_platform() == 'linux' or _get_platform() == 'linux64': | ||
568 | first = 1 | ||
569 | for tfile in tar.getnames(): | ||
570 | if tfile.find('.so.') > 0: | ||
571 | LINK = re.sub(r'\.so\.[0-9.]*$', '.so', tfile) | ||
572 | link_name = "../" + LINK | ||
573 | if not os.path.exists(link_name): | ||
574 | if first == 1: | ||
575 | first = 0 | ||
576 | print "Adding missing symlink(s) for package %s:" % ifile.filename | ||
577 | target = os.path.basename(tfile) | ||
578 | soname = os.popen("readelf -d \"../%(tfile)s\" " | ||
579 | " | grep SONAME " | ||
580 | " | sed -e 's/.*\[//;s/\].*//'" % {"tfile": tfile}).read() | ||
581 | soname = soname.strip() | ||
582 | if soname: # not empty | ||
583 | tmpfname = os.path.dirname(LINK) + "/" + soname | ||
584 | if os.path.exists("../" + tmpfname): | ||
585 | target = soname | ||
586 | else: | ||
587 | print "WARNING: SONAME %s doesn't exist!" % tmpfname | ||
588 | os.symlink(target, link_name) | ||
589 | print " %s --> %s" % (LINK, target) | ||
566 | if ifile.pkgname in self._installed: | 590 | if ifile.pkgname in self._installed: |
567 | self._installed[ifile.pkgname].add_files( | 591 | self._installed[ifile.pkgname].add_files( |
568 | ifile.url, | 592 | ifile.url, |