~gmb/launchpad/bug-644346

« back to all changes in this revision

Viewing changes to lib/lp/testing/factory.py

  • Committer: Graham Binns
  • Date: 2010-09-23 08:59:28 UTC
  • mfrom: (11575.1.37 launchpad)
  • Revision ID: graham@canonical.com-20100923085928-4x8vlt72gvzppb11
Merged devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1944
1944
            processorfamily = ProcessorFamilySet().getByName('powerpc')
1945
1945
        if owner is None:
1946
1946
            owner = self.makePerson()
 
1947
        # XXX: architecturetag & processerfamily are tightly coupled. It's
 
1948
        # wrong to just make a fresh architecture tag without also making a
 
1949
        # processor family to go with it (ideally with processors!)
1947
1950
        if architecturetag is None:
1948
1951
            architecturetag = self.getUniqueString('arch')
1949
1952
        return distroseries.newArch(
2625
2628
 
2626
2629
    def makeBinaryPackageBuild(self, source_package_release=None,
2627
2630
            distroarchseries=None, archive=None, builder=None,
2628
 
            status=None):
 
2631
            status=None, pocket=None):
2629
2632
        """Create a BinaryPackageBuild.
2630
2633
 
2631
2634
        If archive is not supplied, the source_package_release is used
2656
2659
                processorfamily=processor.family)
2657
2660
        if status is None:
2658
2661
            status = BuildStatus.NEEDSBUILD
 
2662
        if pocket is None:
 
2663
            pocket = PackagePublishingPocket.RELEASE
2659
2664
        binary_package_build = getUtility(IBinaryPackageBuildSet).new(
2660
2665
            source_package_release=source_package_release,
2661
2666
            processor=processor,
2662
2667
            distro_arch_series=distroarchseries,
2663
2668
            status=status,
2664
2669
            archive=archive,
2665
 
            pocket=PackagePublishingPocket.RELEASE,
 
2670
            pocket=pocket,
2666
2671
            date_created=self.getUniqueDate())
2667
2672
        naked_build = removeSecurityProxy(binary_package_build)
2668
2673
        naked_build.builder = builder