validate_enabled_restricted_families applies to all non-virtualized archives, not just main archives
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
William Grant |
Bug Description
The newish form validation when setting an archive's restricted architectures is this:
def validate_
if (not require_virtualized and
That is, it rejects an attempt to restrict the architectures of any non-virtual archive.
But from Archive.
if self.is_main and not self.require_
return getUtility(
Only non-virtual archives that are also main archives implicitly get all architectures. And they do *implicitly* get all architectures, regardless of the setting of the checkboxes. This means, for example, that Ubuntu's primary archive probably doesn't have the armhf checkbox ticked, but still builds on armhf.
Except now I see it's even sillier than that. Apparently the validator doesn't run if you check no architectures at all. So you can't restrict a non-virtual PPA to a non-null subset of the restricted architectures: it's all or nothing. And the form may lie if used on a non-virtual main archive, suggesting that some architectures are forbidden when they are in fact allowed.
ARM builders are a scarce resource, so it's important it be possible to restrict an archive from one or more of the ARM subarches.
Related branches
- Steve Kowalik (community): Approve (code)
-
Diff: 379 lines (+10/-206)7 files modifiedlib/lp/registry/browser/distribution.py (+0/-15)
lib/lp/registry/browser/tests/test_distribution_views.py (+5/-56)
lib/lp/soyuz/browser/archive.py (+1/-33)
lib/lp/soyuz/browser/tests/test_archive_admin_view.py (+0/-47)
lib/lp/soyuz/interfaces/archive.py (+0/-5)
lib/lp/soyuz/model/archive.py (+4/-20)
lib/lp/soyuz/tests/test_archive.py (+0/-30)
Changed in launchpad: | |
assignee: | nobody → William Grant (wgrant) |
status: | Triaged → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Fixed in stable r16003 <http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ stable/ revision/ 16003>.