launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00357
[Merge] lp:~wgrant/launchpad/bug-605002-P-a-s-linux-any into lp:launchpad/devel
William Grant has proposed merging lp:~wgrant/launchpad/bug-605002-P-a-s-linux-any into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#605002 Soyuz doesn't accept upload with "Architecture: linux-any"
https://bugs.launchpad.net/bugs/605002
This branch lets Soyuz correctly calculate build architectures for packages with an architecture hint string of 'linux-any', fixing bug #605002. See http://www.debian.org/doc/debian-policy/ch-customized-programs.html#s-arch-wildcard-spec for the field spec.
While at first glance it appeared that removing supported OS prefixes before checking for 'any', 'all', etc. would have been a good solution, that would have permitted values of 'any-any', 'linux-all' and 'any-all', none of which are valid. So 'linux-any' is hardcoded for now. It can be made prettier if we ever supported multiple OSes.
--
https://code.launchpad.net/~wgrant/launchpad/bug-605002-P-a-s-linux-any/+merge/31451
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-605002-P-a-s-linux-any into lp:launchpad/devel.
=== modified file 'lib/lp/soyuz/doc/package-arch-specific.txt'
--- lib/lp/soyuz/doc/package-arch-specific.txt 2010-03-15 10:22:34 +0000
+++ lib/lp/soyuz/doc/package-arch-specific.txt 2010-07-31 07:28:47 +0000
@@ -49,7 +49,7 @@
... sourcename='test-buildd-4', version='670',
... architecturehintlist="hppa")
-Create sources with 'any-$(ARCH)' and 'linux-$(ARCH)' notation.
+Create sources with 'any-$(ARCH)', 'linux-$(ARCH)' and 'linux-any' notation.
>>> pub_any_foo = test_publisher.getPubSource(
... sourcename='test-buildd-6', version='672',
@@ -59,13 +59,17 @@
... sourcename='test-buildd-7', version='673',
... architecturehintlist="linux-i386")
+ >>> pub_linux_any = test_publisher.getPubSource(
+ ... sourcename='test-buildd-7', version='674',
+ ... architecturehintlist="linux-any")
+
Create a PPA source publication.
>>> from canonical.launchpad.interfaces import IPersonSet
>>> cprov = getUtility(IPersonSet).getByName('cprov')
>>> pub_ppa = test_publisher.getPubSource(
- ... sourcename='test-ppa', version='674',
+ ... sourcename='test-ppa', version='675',
... architecturehintlist="i386 hppa",
... archive=cprov.archive)
@@ -136,6 +140,10 @@
>>> print_build_architectures(pub_linux_foo)
i386
+ >>> print_build_architectures(pub_linux_any)
+ hppa
+ i386
+
== PPA architectures ==
=== modified file 'lib/lp/soyuz/pas.py'
--- lib/lp/soyuz/pas.py 2010-05-21 12:18:08 +0000
+++ lib/lp/soyuz/pas.py 2010-07-31 07:28:47 +0000
@@ -8,6 +8,7 @@
from lp.soyuz.interfaces.archive import ArchivePurpose
+
class BuildDaemonPackagesArchSpecific:
"""Parse and implement "PackagesArchSpecific"."""
@@ -132,8 +133,8 @@
known-failures build attempts and thus saving build-farm time.
For PPA publications we only consider architectures supported by PPA
- subsystem (`DistroArchSeries`.supports_virtualized flag) and P-a-s is turned
- off to give the users the chance to test their fixes for upstream
+ subsystem (`DistroArchSeries`.supports_virtualized flag) and P-a-s is
+ turned off to give the users the chance to test their fixes for upstream
problems.
:param: pubrec: `ISourcePackagePublishingHistory` representing the
@@ -167,7 +168,10 @@
legal_arch_tags = set(arch.architecturetag for arch in legal_archseries)
- if hint_string == 'any':
+ # We need to support arch tags like any-foo and linux-foo, so remove
+ # supported kernel prefixes, Also allow linux-any but not any-any.
+ # See bugs #73761 and #605002.
+ if hint_string in ['any', 'linux-any']:
package_tags = legal_arch_tags
elif hint_string == 'all':
nominated_arch = distroseries.nominatedarchindep
@@ -178,11 +182,9 @@
package_tags = set([nominated_arch.architecturetag])
else:
my_archs = hint_string.split()
- # Allow any-foo or linux-foo to mean foo. See bug 73761.
- my_archs = [arch.replace("any-", "") for arch in my_archs]
- my_archs = [arch.replace("linux-", "") for arch in my_archs]
- my_archs = set(my_archs)
- package_tags = my_archs.intersection(legal_arch_tags)
+ for kernel in ['linux', 'any']:
+ my_archs = [arch.replace("%s-" % kernel, "") for arch in my_archs]
+ package_tags = set(my_archs).intersection(legal_arch_tags)
if pas_verify:
build_tags = set()