launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02335
[Merge] lp:~wgrant/launchpad/no-arm-builds-allowed into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/no-arm-builds-allowed into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#701387 Archive.arm_builds_allowed is obsolete
https://bugs.launchpad.net/bugs/701387
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/no-arm-builds-allowed/+merge/46243
Back before we had general restricted architecture support, ARM support had its own flag. Somehow a property (Archive.arm_builds_allowed) survived the purge. This branch finishes it.
--
https://code.launchpad.net/~wgrant/launchpad/no-arm-builds-allowed/+merge/46243
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/no-arm-builds-allowed into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py 2011-01-03 22:15:46 +0000
+++ lib/lp/soyuz/model/archive.py 2011-01-14 09:44:14 +0000
@@ -295,39 +295,6 @@
commercial = BoolCol(
dbName='commercial', notNull=True, default=False)
- def _get_arm_builds_enabled(self):
- """Check whether ARM builds are allowed for this archive."""
- archive_arch_set = getUtility(IArchiveArchSet)
- restricted_families = archive_arch_set.getRestrictedFamilies(self)
- arm = getUtility(IProcessorFamilySet).getByName('arm')
- for (family, archive_arch) in restricted_families:
- if family == arm:
- return (archive_arch is not None)
- # ARM doesn't exist or isn't restricted. Either way, there is no
- # need for an explicit association.
- return False
-
- def _set_arm_builds_enabled(self, value):
- """Set whether ARM builds are enabled for this archive."""
- archive_arch_set = getUtility(IArchiveArchSet)
- restricted_families = archive_arch_set.getRestrictedFamilies(self)
- arm = getUtility(IProcessorFamilySet).getByName('arm')
- for (family, archive_arch) in restricted_families:
- if family == arm:
- if value:
- if archive_arch is not None:
- # ARM builds are already enabled
- return
- else:
- archive_arch_set.new(self, family)
- else:
- if archive_arch is not None:
- Store.of(self).remove(archive_arch)
- else:
- pass # ARM builds are already disabled
- arm_builds_allowed = property(_get_arm_builds_enabled,
- _set_arm_builds_enabled)
-
def _init(self, *args, **kw):
"""Provide the right interface for URL traversal."""
SQLBase._init(self, *args, **kw)