Пример #1
0
 def __call__(self, args):
     config = self.deploy.config
     packages = self.get_packages(getattr(args, 'package-regexp'),
                                  auto_checkout=args.auto_checkout)
     try:
         workingcopies = WorkingCopies(self.deploy.sources)
         workingcopies.checkout(sorted(packages),
                                verbose=args.verbose,
                                always_accept_server_certificate=self.deploy.always_accept_server_certificate)
         for name in sorted(packages):
             source = self.deploy.sources[name]
             if not source.get('egg', True):
                 continue
             config.deploy[name] = True
             logger.info("Activated '%s'." % name)
         logger.warn("Don't forget to run buildout again, so the checked out packages are used as deploy eggs.")
         config.save()
     except (ValueError, KeyError), e:
         logger.error(e)
         sys.exit(1)
Пример #2
0
 def __call__(self, args):
     config = self.deploy.config
     packages = self.get_packages(getattr(args, 'package-regexp'),
                                  auto_checkout=args.auto_checkout,
                                  checked_out=args.checked_out,
                                  deploy=args.deploy)
     changed = False
     for name in sorted(packages):
         source = self.deploy.sources[name]
         if not source.exists():
             logger.warning("The package '%s' matched, but isn't checked out." % name)
             continue
         if not source.get('egg', True):
             logger.warning("The package '%s' isn't an egg." % name)
             continue
         config.deploy[name] = True
         logger.info("Activated '%s'." % name)
         changed = True
     if changed:
         logger.warn("Don't forget to run buildout again, so the actived packages are actually used.")
     config.save()