launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19823
[Merge] lp:~wgrant/launchpad/nai-fallback into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/nai-fallback into lp:launchpad.
Commit message:
determine_architecture_to_build now falls back if nai is unavailable.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1530217 in Launchpad itself: "determine_architectures_to_build creates no builds for arch-indep source when nominatedarchindep is unbuildable"
https://bugs.launchpad.net/launchpad/+bug/1530217
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/nai-fallback/+merge/281434
determine_architecture_to_build now falls back if nai is unavailable.
Some archives don't permit nominatedarchindep, and classically we haven't created arch-indep builds at all in those cases. But since the rework last year we fall back to one of the available architectures whenever "all" is not the only term, and now we fall back in that case as well. "all now behaves like "any all", just without the architecture-specific builds.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/nai-fallback into lp:launchpad.
=== modified file 'lib/lp/soyuz/adapters/buildarch.py'
--- lib/lp/soyuz/adapters/buildarch.py 2015-02-11 09:51:48 +0000
+++ lib/lp/soyuz/adapters/buildarch.py 2015-12-30 23:59:04 +0000
@@ -70,10 +70,8 @@
indep_archs, _ = resolve_arch_spec(indep_hint_list, need_archs)
elif not indep_only:
indep_archs = set(build_archs)
- elif nominated_arch_indep in need_archs:
- indep_archs = set([nominated_arch_indep])
else:
- indep_archs = set()
+ indep_archs = set(need_archs)
indep_arch = None
if need_arch_indep:
=== modified file 'lib/lp/soyuz/adapters/tests/test_buildarch.py'
--- lib/lp/soyuz/adapters/tests/test_buildarch.py 2015-02-11 13:40:01 +0000
+++ lib/lp/soyuz/adapters/tests/test_buildarch.py 2015-12-30 23:59:04 +0000
@@ -122,12 +122,14 @@
self.assertArchsForHint(
'any-any', {'armel': False, 'hppa': False, 'i386': True})
- def test_no_all_builds_when_nominatedarchindep_not_permitted(self):
- # Some archives (eg. armel rebuilds) don't want arch-indep
- # builds. If the nominatedarchindep architecture (normally
- # i386) is omitted, no builds will be created for arch-indep
- # sources.
- self.assertArchsForHint('all', {}, allowed_arch_tags=['hppa'])
+ def test_disallowed_nominatedarchindep_falls_back(self):
+ # Some archives don't allow nominatedarchindep builds. In that
+ # case, one of the other architectures is chosen.
+ self.assertArchsForHint(
+ 'any all', {'hppa': True, 'armel': False},
+ allowed_arch_tags=['hppa', 'armel'])
+ self.assertArchsForHint(
+ 'all', {'hppa': True}, allowed_arch_tags=['hppa', 'armel'])
def test_indep_hint_only(self):
# Some packages need to build arch-indep builds on a specific
Follow ups