launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #33132
[Merge] ~mwhudson/launchpad:no-variant-build-for-arch-all into launchpad:master
Michael Hudson-Doyle has proposed merging ~mwhudson/launchpad:no-variant-build-for-arch-all into launchpad:master.
Commit message:
do not create a variant build for an arch-all only package
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~mwhudson/launchpad/+git/launchpad/+merge/494311
As pointed out to me here https://launchpad.net/ubuntu/+source/distro-info-data/0.66ubuntu0.1 a package that only builds arch indep binaries gets an amd64v3 build that fails pretty much instantly.
This fix feels a bit ugly but I'm not sure what would be cleaner. We could change determine_architectures_to_build to return 'indep_only' but the net effect would be the same I think.
This branch (and the previous one) assumes that we would never want to build indep packages on a variant DAS but that seems a pretty reasonable restriction.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~mwhudson/launchpad:no-variant-build-for-arch-all into launchpad:master.
diff --git a/lib/lp/soyuz/model/binarypackagebuild.py b/lib/lp/soyuz/model/binarypackagebuild.py
index c866d17..26b5298 100644
--- a/lib/lp/soyuz/model/binarypackagebuild.py
+++ b/lib/lp/soyuz/model/binarypackagebuild.py
@@ -1594,6 +1594,11 @@ class BinaryPackageBuildSet(SpecificBuildFarmJobSourceMixin):
for das in sorted(need_archs, key=attrgetter("architecturetag")):
if abi_tag(das) not in create_tag_map:
continue
+ if (
+ sourcepackagerelease.architecturehintlist == "all"
+ and das.underlying_architecturetag is not None
+ ):
+ continue
indep = (
False
if das.underlying_architecturetag is not None
diff --git a/lib/lp/soyuz/tests/test_build_set.py b/lib/lp/soyuz/tests/test_build_set.py
index bc5165a..c4b0593 100644
--- a/lib/lp/soyuz/tests/test_build_set.py
+++ b/lib/lp/soyuz/tests/test_build_set.py
@@ -750,6 +750,26 @@ class BuildRecordCreationTests(TestNativePublishingBase):
)
self.assertBuildsMatch({"x32v2": False}, builds)
+ def test_createForSource_variant_all(self):
+ # createForSource with a hintlist of a specfic architecture
+ # builds variants of that architecture too.
+ spr = self.factory.makeSourcePackageRelease(
+ architecturehintlist="all",
+ )
+ x32v2 = self.factory.makeProcessor(
+ name="x32v2",
+ supports_virtualized=True,
+ build_by_default=True,
+ )
+ self.factory.makeBuildableDistroArchSeries(
+ distroseries=self.distroseries2,
+ architecturetag="x32v2",
+ processor=x32v2,
+ underlying_architecturetag="x32",
+ )
+ builds = self.createBuilds(spr, self.distroseries2)
+ self.assertBuildsMatch({"x32": True}, builds)
+
def test_createForSource_honours_filters(self):
# If there are DistroArchSeriesFilters for some architectures,
# createForSource honours them.