Changeset 2644
- Timestamp:
- Jun 5, 2010 3:22:03 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
coopr.misc/trunk/util/coopr_install
r2639 r2644 2603 2603 # 2604 2604 2605 import time 2605 2606 import commands 2606 2607 import re … … 2832 2833 2833 2834 def guess_versions(self, offline=False): 2835 if offline: 2836 self.release = self.config.root 2837 if self.release is None: 2838 self.release = self.name 2839 self.stable = None 2840 self.trunk = None 2841 return 2834 2842 if not self.config.root is None: 2835 2843 if using_subversion: … … 3333 3341 if len(args) == 0: 3334 3342 args.append(self.abshome_dir) 3335 # 3336 # Parse config files 3337 # 3338 if options.update: 3343 if options.update or options.offline: 3339 3344 self.config=None 3340 3345 options.config_files.append( join(self.abshome_dir, 'admin', 'config.ini') ) 3346 # 3347 # If applying preinstall, then only do subversion exports 3348 # 3349 if options.preinstall: 3350 Repository.svn_get='export' 3351 3352 def read_config_files(self, options): 3353 # 3354 # Parse config files 3355 # 3341 3356 if not self.config is None and (len(options.config_files) == 0 or options.keep_config): 3342 3357 fp = StringIO.StringIO(self.config) … … 3356 3371 print " END - Configuration summary" 3357 3372 print "-----------------------------------------------------------------" 3358 #3359 # If applying preinstall, then only do subversion exports3360 #3361 if options.preinstall:3362 Repository.svn_get='export'3363 3373 3364 3374 def get_homedir(self, options, args): … … 3385 3395 3386 3396 def setup_installer(self, options): 3397 if options.verbose: 3398 stime = time.time() 3387 3399 if options.preinstall: 3388 3400 print "Creating preinstall zip file in '%s'" % self.home_dir … … 3449 3461 unzip_file(file, dir=self.abshome_dir) 3450 3462 3463 # 3464 # Read config files now 3465 # 3466 self.read_config_files(options) 3467 # 3468 # Setup packages for installation 3469 # 3451 3470 if options.preinstall or not options.offline: 3452 3471 #self.get_packages(options) … … 3461 3480 for pkg in self.sw_packages: 3462 3481 pkg.guess_versions(True) 3482 if options.verbose: 3483 ftime = time.time() 3484 print "Timing for 'setup_installer' - %f sec" % (ftime-stime) 3463 3485 3464 3486 def get_packages(self, options): 3487 if options.verbose: 3488 stime = time.time() 3465 3489 # 3466 3490 # Setup the 'admin' directory … … 3508 3532 # 3509 3533 for pkg in self.sw_packages: 3534 if options.verbose: 3535 pkg_stime = time.time() 3510 3536 pkg.guess_versions(False) 3511 3537 if not pkg.install: … … 3525 3551 if not options.update: 3526 3552 pkg.install_release(dir=tmp, install=False, preinstall=options.preinstall, offline=options.offline) 3553 if options.verbose: 3554 pkg_ftime = time.time() 3555 print "Timing to install package %s - %f sec" % (str(pkg.config.name),pkg_ftime-pkg_stime) 3527 3556 if options.update or not os.path.exists(join(self.abshome_dir,'doc')): 3528 3557 self.install_auxdirs(options) … … 3543 3572 zip_file(self.default_dirname+'.zip', ['.']) 3544 3573 sys.exit(0) 3574 if options.verbose: 3575 ftime = time.time() 3576 print "Timing for 'get_packages' - %f sec" % (ftime-stime) 3545 3577 3546 3578 def get_other_packages(self, options): … … 3552 3584 3553 3585 def install_packages(self, options): 3586 if options.verbose: 3587 stime = time.time() 3554 3588 # 3555 3589 # Set the bin directory … … 3574 3608 # 3575 3609 for pkg in self.sw_packages: 3610 if options.verbose: 3611 pkg_stime = time.time() 3576 3612 if not pkg.install: 3577 3613 pkg.find_pkgroot(trunk=options.trunk, stable=options.stable, release=not (options.trunk or options.stable)) … … 3596 3632 else: 3597 3633 pkg.install_release(dir=srcdir, preinstall=options.preinstall, offline=options.offline) 3634 if options.verbose: 3635 pkg_ftime = time.time() 3636 print "Timing to install package %s - %f sec" % (str(pkg.config.name),pkg_ftime-pkg_stime) 3598 3637 # 3599 3638 # Copy the <env>/Scripts/* files into <env>/bin … … 3616 3655 print "" 3617 3656 print "Finished installation in '%s'" % self.home_dir 3657 # 3658 if options.verbose: 3659 ftime = time.time() 3660 print "Timing for 'install_packages' - %f sec" % (ftime-stime) 3618 3661 3619 3662 def localize_cmd_files(self, dir, force_localization=False):
Note: See TracChangeset
for help on using the changeset viewer.