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:
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)
SPR.getBuildByA rch() 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, binarypackagere lease, binarypackagepu blishinghistory where Build.id = BinaryPackageRe lease.build AND BinaryPackageRe lease.id = BinaryPackagePu blishingHistory .binarypackager elease AND BinaryPackagePu blishingHistory .distroarchrele ase = 21 AND BinaryPackagePu blishingHistory .archive = 1 AND Build.sourcepac kagerelease = 158366;
id
--------
353441
(1 row)
https:/ /launchpad. net/ubuntu/ +source/ krb5/1. 4.3-5ubuntu0. 4/+build/ 353441