aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/scripts
diff options
context:
space:
mode:
authorJacek Antonelli2011-05-08 15:13:37 -0500
committerJacek Antonelli2011-05-08 15:50:49 -0500
commit7278f0254a3944bd2bcbf1e855fb0d90c3086a27 (patch)
tree5d7ecb81ebf1a07482f0a7d3d13acd7f18360c0b /linden/scripts
parentImprudence 1.3.1 released. (diff)
parentChanged version to Experimental 2011.04.19 (diff)
downloadmeta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.zip
meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.gz
meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.bz2
meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.xz
Merged Experimental branch (exp) back into main line (next).
Git thought many files (almost 100) had merge conflicts. But, after resolving the conflicts (which were mostly trivial), almost all the files turned out to be the same as in the exp branch. So, the conflicts are not listed here. Check the diff between commit 244ffe8 and this commit to see what really changed.
Diffstat (limited to 'linden/scripts')
-rwxr-xr-xlinden/scripts/install.py68
1 files changed, 38 insertions, 30 deletions
diff --git a/linden/scripts/install.py b/linden/scripts/install.py
index 931968a..f09fc48 100755
--- a/linden/scripts/install.py
+++ b/linden/scripts/install.py
@@ -493,7 +493,7 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package"""
493 for filename in remove_file_list: 493 for filename in remove_file_list:
494 print "rm",filename 494 print "rm",filename
495 if not self._dryrun: 495 if not self._dryrun:
496 if os.path.exists(filename): 496 if os.path.lexists(filename):
497 remove_dir_set.add(os.path.dirname(filename)) 497 remove_dir_set.add(os.path.dirname(filename))
498 try: 498 try:
499 os.remove(filename) 499 os.remove(filename)
@@ -534,24 +534,24 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package"""
534 platform, 534 platform,
535 cache_dir)) 535 cache_dir))
536 to_install = [] 536 to_install = []
537 to_uninstall = []
537 #print "self._installed",self._installed 538 #print "self._installed",self._installed
538 for ifile in ifiles: 539 for ifile in ifiles:
539 if ifile.pkgname not in self._installed: 540 if ifile.pkgname not in self._installed:
540 to_install.append(ifile) 541 to_install.append(ifile)
541 elif ifile.url not in self._installed[ifile.pkgname].urls(): 542 elif ifile.url not in self._installed[ifile.pkgname].urls():
543 to_uninstall.append(ifile.pkgname)
542 to_install.append(ifile) 544 to_install.append(ifile)
543 elif ifile.md5sum != \ 545 elif ifile.md5sum != \
544 self._installed[ifile.pkgname].get_md5sum(ifile.url): 546 self._installed[ifile.pkgname].get_md5sum(ifile.url):
545 # *TODO: We may want to uninstall the old version too 547 to_uninstall.append(ifile.pkgname)
546 # when we detect it is installed, but the md5 sum is
547 # different.
548 to_install.append(ifile) 548 to_install.append(ifile)
549 else: 549 else:
550 #print "Installation up to date:", 550 #print "Installation up to date:",
551 # ifile.pkgname,ifile.platform_path 551 # ifile.pkgname,ifile.platform_path
552 pass 552 pass
553 #print "to_install",to_install 553 #print "to_install",to_install
554 return to_install 554 return [to_install, to_uninstall]
555 555
556 def _install(self, to_install, install_dir): 556 def _install(self, to_install, install_dir):
557 for ifile in to_install: 557 for ifile in to_install:
@@ -564,40 +564,43 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package"""
564 tar.extractall(path=install_dir) 564 tar.extractall(path=install_dir)
565 except AttributeError: 565 except AttributeError:
566 _extractall(tar, path=install_dir) 566 _extractall(tar, path=install_dir)
567 if _get_platform() == 'linux' or _get_platform() == 'linux64': 567 symlinks = []
568 first = 1 568 if _get_platform() == 'linux' or _get_platform() == 'linux64':
569 for tfile in tar.getnames(): 569 first = 1
570 if tfile.find('.so.') > 0: 570 for tfile in tar.getnames():
571 LINK = re.sub(r'\.so\.[0-9.]*$', '.so', tfile) 571 if tfile.find('.so.') > 0:
572 link_name = "../" + LINK 572 LINK = re.sub(r'\.so\.[0-9.]*$', '.so', tfile)
573 if not os.path.exists(link_name): 573 link_name = install_dir + "/" + LINK
574 if first == 1: 574 if not os.path.exists(link_name):
575 first = 0 575 if first == 1:
576 print "Adding missing symlink(s) for package %s:" % ifile.filename 576 first = 0
577 target = os.path.basename(tfile) 577 print "Adding missing symlink(s) for package %s:" % ifile.filename
578 soname = os.popen("readelf -d \"../%(tfile)s\" " 578 target = os.path.basename(tfile)
579 " | grep SONAME " 579 soname = os.popen("readelf -d \"%(install_dir)s/%(tfile)s\" %(stderr_redirect)s"
580 " | sed -e 's/.*\[//;s/\].*//'" % {"tfile": tfile}).read() 580 " | grep SONAME | sed -e 's/.*\[//;s/\].*//'" %
581 soname = soname.strip() 581 {"install_dir": install_dir, "tfile": tfile, "stderr_redirect": ("2>/dev/null" if self._dryrun else "")}).read()
582 if soname: # not empty 582 soname = soname.strip()
583 tmpfname = os.path.dirname(LINK) + "/" + soname 583 if soname: # not empty
584 if os.path.exists("../" + tmpfname): 584 tmpfname = os.path.dirname(LINK) + "/" + soname
585 target = soname 585 if os.path.exists(install_dir + "/" + tmpfname):
586 else: 586 target = soname
587 print "WARNING: SONAME %s doesn't exist!" % tmpfname 587 else:
588 print "WARNING: SONAME %s doesn't exist!" % tmpfname
589 if not self._dryrun:
588 os.symlink(target, link_name) 590 os.symlink(target, link_name)
589 print " %s --> %s" % (LINK, target) 591 symlinks += [LINK]
592 print " %s --> %s" % (LINK, target)
590 if ifile.pkgname in self._installed: 593 if ifile.pkgname in self._installed:
591 self._installed[ifile.pkgname].add_files( 594 self._installed[ifile.pkgname].add_files(
592 ifile.url, 595 ifile.url,
593 tar.getnames()) 596 tar.getnames() + symlinks)
594 self._installed[ifile.pkgname].set_md5sum( 597 self._installed[ifile.pkgname].set_md5sum(
595 ifile.url, 598 ifile.url,
596 ifile.md5sum) 599 ifile.md5sum)
597 else: 600 else:
598 # *HACK: this understands the installed package syntax. 601 # *HACK: this understands the installed package syntax.
599 definition = { ifile.url : 602 definition = { ifile.url :
600 {'files': tar.getnames(), 603 {'files': tar.getnames() + symlinks,
601 'md5sum' : ifile.md5sum } } 604 'md5sum' : ifile.md5sum } }
602 self._installed[ifile.pkgname] = InstalledPackage(definition) 605 self._installed[ifile.pkgname] = InstalledPackage(definition)
603 self._installed_changed = True 606 self._installed_changed = True
@@ -617,12 +620,17 @@ windows/i686/vs/2003 -- specify a windows visual studio 2003 package"""
617 cache_dir = os.path.realpath(cache_dir) 620 cache_dir = os.path.realpath(cache_dir)
618 _mkdir(install_dir) 621 _mkdir(install_dir)
619 _mkdir(cache_dir) 622 _mkdir(cache_dir)
620 to_install = self._build_ifiles(platform, cache_dir) 623 to_install_uninstall = self._build_ifiles(platform, cache_dir)
624 to_install = to_install_uninstall[0]
625 to_uninstall = to_install_uninstall[1]
621 626
622 # Filter for files which we actually requested to install. 627 # Filter for files which we actually requested to install.
623 to_install = [ifl for ifl in to_install if ifl.pkgname in installables] 628 to_install = [ifl for ifl in to_install if ifl.pkgname in installables]
629 to_uninstall = [ifl for ifl in to_uninstall if ifl in installables]
624 for ifile in to_install: 630 for ifile in to_install:
625 ifile.fetch_local() 631 ifile.fetch_local()
632 if to_uninstall:
633 self.uninstall(to_uninstall, install_dir)
626 self._install(to_install, install_dir) 634 self._install(to_install, install_dir)
627 635
628 def do_install(self, installables, platform, install_dir, cache_dir=None, 636 def do_install(self, installables, platform, install_dir, cache_dir=None,