launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02204
[Merge] lp:~wgrant/launchpad/bug-692114-recipes-main-component into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/bug-692114-recipes-main-component into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#692114 Recipe builds require indices for non-main PPA components
https://bugs.launchpad.net/bugs/692114
SourcePackageRecipeBuild.current_component is now always multiverse. Recipes only build into PPAs, and PPAs only support main, so multiverse is always wrong. New PPAs don't even have indices for the other components, so recipe builds fail!
This will need to become more dynamic when we start building recipes into other archive types, but for now setting it to main will work fine. Note that this does not affect the component used by the primary archive dependency.
--
https://code.launchpad.net/~wgrant/launchpad/bug-692114-recipes-main-component/+merge/44184
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-692114-recipes-main-component into lp:launchpad.
=== modified file 'lib/lp/code/model/sourcepackagerecipebuild.py'
--- lib/lp/code/model/sourcepackagerecipebuild.py 2010-11-30 12:23:01 +0000
+++ lib/lp/code/model/sourcepackagerecipebuild.py 2010-12-20 01:48:50 +0000
@@ -61,9 +61,6 @@
from lp.code.model.sourcepackagerecipedata import SourcePackageRecipeData
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.job.model.job import Job
-from lp.soyuz.adapters.archivedependencies import (
- default_component_dependency_name,
- )
from lp.soyuz.interfaces.component import IComponentSet
from lp.soyuz.model.binarypackagebuild import BinaryPackageBuild
from lp.soyuz.model.buildfarmbuildjob import BuildFarmBuildJob
@@ -96,7 +93,10 @@
@property
def current_component(self):
- return getUtility(IComponentSet)[default_component_dependency_name]
+ # Since recipes only build into PPAs, they should always build
+ # in main. This will need to change once other archives are
+ # supported.
+ return getUtility(IComponentSet)['main']
distroseries_id = Int(name='distroseries', allow_none=True)
distroseries = Reference(distroseries_id, 'DistroSeries.id')
=== modified file 'lib/lp/code/model/tests/test_sourcepackagerecipebuild.py'
--- lib/lp/code/model/tests/test_sourcepackagerecipebuild.py 2010-11-19 12:22:15 +0000
+++ lib/lp/code/model/tests/test_sourcepackagerecipebuild.py 2010-12-20 01:48:50 +0000
@@ -135,6 +135,12 @@
spb = self.makeSourcePackageRecipeBuild()
self.assertEqual(spb.distroseries.distribution, spb.distribution)
+ def test_current_component(self):
+ # Since recipes build only into PPAs, they always build in main.
+ # PPAs lack indices for other components.
+ spb = self.makeSourcePackageRecipeBuild()
+ self.assertEqual('main', spb.current_component.name)
+
def test_is_private(self):
# A source package recipe build is currently always public.
spb = self.makeSourcePackageRecipeBuild()