Comment 2 for bug 65712

Revision history for this message
Celso Providelo (cprov) wrote :

SPR.getBuildByArch() is definitely broken.
When some architecture-indep binary gets published in all architectures (as expected) it suppress the lookup, returning the wrong build. Let's try an example:

Source krb5, https://launchpad.net/ubuntu/+source/krb5/1.4.3-5ubuntu0.4 (158366) produces krb5-doc_1.4.3-5ubuntu0.4_all.deb.

When this arch-indep binary is published the query issued by getBuildByArch('hppa', krb5_1.4.3-5ubuntu0.4) returns the i386 build:

launchpad_prod=> SELECT build.id from build, binarypackagerelease, binarypackagepublishinghistory where Build.id = BinaryPackageRelease.build AND BinaryPackageRelease.id = BinaryPackagePublishingHistory.binarypackagerelease AND BinaryPackagePublishingHistory.distroarchrelease = 21 AND BinaryPackagePublishingHistory.archive = 1 AND Build.sourcepackagerelease = 158366;
   id
--------
 353441
(1 row)

https://launchpad.net/ubuntu/+source/krb5/1.4.3-5ubuntu0.4/+build/353441