def getPackageLocation(self, distribution_name='ubuntu', suite=None,
                        purpose=None, person_name=None,
                        archive_name=None, packageset_names=None):
     """Use a helper method to setup a `PackageLocation` object."""
     return build_package_location(
         distribution_name, suite, purpose, person_name, archive_name,
         packageset_names=packageset_names)
Пример #2
0
 def getPackageLocation(self, distribution_name='ubuntu', suite=None,
                        purpose=None, person_name=None,
                        archive_name=None, packageset_names=None):
     """Use a helper method to setup a `PackageLocation` object."""
     return build_package_location(
         distribution_name, suite, purpose, person_name, archive_name,
         packageset_names=packageset_names)
Пример #3
0
 def setupLocation(self):
     """Setup `PackageLocation` for context distribution and suite."""
     # These can raise PackageLocationError, but we're happy to pass
     # it upwards.
     if getattr(self.options, 'partner_archive', ''):
         self.location = build_package_location(
             self.options.distribution_name,
             self.options.suite,
             ArchivePurpose.PARTNER)
     elif getattr(self.options, 'archive_owner_name', ''):
         self.location = build_package_location(
             self.options.distribution_name,
             self.options.suite,
             ArchivePurpose.PPA,
             self.options.archive_owner_name,
             self.options.archive_name)
     else:
         self.location = build_package_location(
             self.options.distribution_name,
             self.options.suite)
Пример #4
0
 def build_location(distro, suite, component, packageset_names=None):
     """Build and return package location."""
     location = build_package_location(
         distro, suite=suite, packageset_names=packageset_names)
     if component is not None:
         try:
             the_component = getUtility(IComponentSet)[component]
         except NotFoundError:
             raise SoyuzScriptError(
                 "Invalid component name: '%s'" % component)
         location.component = the_component
     return location
Пример #5
0
 def build_location(distro, suite, component, packageset_names=None):
     """Build and return package location."""
     location = build_package_location(
         distro, suite=suite, packageset_names=packageset_names)
     if component is not None:
         try:
             the_component = getUtility(IComponentSet)[component]
         except NotFoundError:
             raise SoyuzScriptError(
                 "Invalid component name: '%s'" % component)
         location.component = the_component
     return location
Пример #6
0
    def _buildLocation(self):
        """Build a PackageLocation object

        The location will correspond to the given 'distribution' and 'suite',
        Any PackageLocationError occurring at this point will be masked into
        LaunchpadScriptFailure.
        """
        try:
            self.location = build_package_location(
                distribution_name=self.options.distribution_name,
                suite=self.options.suite)
        except PackageLocationError as err:
            raise LaunchpadScriptFailure(err)