← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/pas-arm into lp:launchpad

 

The proposal to merge lp:~cjwatson/launchpad/pas-arm into lp:launchpad has been updated.

Description changed to:

== Summary ==

Bug 917708 reports that the "any-arm" wildcard is not recognised in packages' Architecture fields.

== Proposed fix ==

Use dpkg-architecture to match architecture wildcards rather than doing an incomplete NIH job.

== Implementation details ==

Launchpad does its own parsing of architecture wildcards, but it does an incomplete job; it has misunderstood the second field of an any-* wildcard as being like an architecture name, whereas actually it's a canonicalised CPU name: these are almost equivalent, but not quite.  The problem reported here is a perfect example of where they aren't equivalent.

Doing a more complete job of this in the framework of Launchpad's hand-rolled parser would involve either (a) a grotty accretion of special cases or (b) parsing dpkg-internal files such as /usr/share/dpkg/triplettable and /usr/share/dpkg/cputable.  Really, though, it should delegate this task to the packaging system, which knows how to do it.  Unfortunately the only public interfaces to this are by way of dpkg-architecture subprocess execution or a Perl module; but the product of the architectures supported by Launchpad and the set of wildcards in use is never going to be particularly large, so a reasonably economical way to approach this is just to cache the result of calling dpkg-architecture for every (architecture, wildcard) pair.

To restore the balance of the LoC force, I disassembled package-arch-specific.txt and merged it into test_pas.py.  doctests--

== Tests ==

bin/test -vvct soyuz.tests.test_pas

== Demo and Q/A ==

I'm not sure it's possible to demo the fix as such, since there are no ARM builders on dogfood.  To avoid trivial embarrassment, though, it might be worth uploading an any-i386 package to dogfood and making sure that that still gets scheduled for building on i386.

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/pas-arm/+merge/107966
-- 
https://code.launchpad.net/~cjwatson/launchpad/pas-arm/+merge/107966
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/pas-arm into lp:launchpad.


References