~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/model/archive.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-06 09:08:39 UTC
  • mfrom: (14421.2.8 sponsor-syncs-bug-827555)
  • Revision ID: launchpad@pqm.canonical.com-20111206090839-fm73xxdr08hyvasc
[r=benji][bug=827555] Make the package copier accept a "sponsored"
 Person which will be used as the SPPH.creator and From: address on
 announcement emails. Also expose the new parameter on
 IArchive.copyPackage[s]() on the API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1556
1556
                "Not enabled for copying to PPAs yet.")
1557
1557
 
1558
1558
    def copyPackage(self, source_name, version, from_archive, to_pocket,
1559
 
                    person, to_series=None, include_binaries=False):
 
1559
                    person, to_series=None, include_binaries=False,
 
1560
                    sponsored=None):
1560
1561
        """See `IArchive`."""
1561
1562
        self._checkCopyPackageFeatureFlags()
1562
1563
 
1576
1577
            target_archive=self, target_distroseries=series,
1577
1578
            target_pocket=pocket,
1578
1579
            package_version=version, include_binaries=include_binaries,
1579
 
            copy_policy=PackageCopyPolicy.INSECURE, requester=person)
 
1580
            copy_policy=PackageCopyPolicy.INSECURE, requester=person,
 
1581
            sponsored=sponsored)
1580
1582
 
1581
1583
    def copyPackages(self, source_names, from_archive, to_pocket,
1582
 
                     person, to_series=None, include_binaries=None):
 
1584
                     person, to_series=None, include_binaries=None,
 
1585
                     sponsored=None):
1583
1586
        """See `IArchive`."""
1584
1587
        self._checkCopyPackageFeatureFlags()
1585
1588
 
1620
1623
        job_source.createMultiple(
1621
1624
            series, copy_tasks, person,
1622
1625
            copy_policy=PackageCopyPolicy.MASS_SYNC,
1623
 
            include_binaries=include_binaries)
 
1626
            include_binaries=include_binaries, sponsored=sponsored)
1624
1627
 
1625
1628
    def _collectLatestPublishedSources(self, from_archive, source_names):
1626
1629
        """Private helper to collect the latest published sources for an