Comment 3 for bug 196783

Revision history for this message
Christian Reis (kiko) wrote :

The reason this happens is that the code uses SourcePackage.latest_published_component, but picks the publication in the most recent active distroseries to create the sourcepackage. Of course, this bites us if the package has been removed during that distroseries! I'm trying to figure out with Colin what the semantics should be for this. It appears they are not trivial:

<kiko> cjwatson, unfortunately, package removals and pockets make that a bit more complicated
<kiko> cjwatson, for a package like mozilla-firefox, what's the criteria?
<kiko> cjwatson, and what about a package which jumps components when uploaded to a non-release component?
* kiko bangs head on desk
<kiko> cjwatson, it might be more practical to simply accept it to be the latest published package anywhere.
<cjwatson> that is so incredibly rare that I think you would have an excellent case for simply choosing the release pocket
<cjwatson> no, that's broken
<cjwatson> consider a package that is in main for intrepid, but is then uploaded to dapper-security/universe
<cjwatson> it makes no sense for that alone to cause it to flip back to universe in the UI
<cjwatson> just considering CURRENT/RELEASE is dead simple and would be just fine
<kiko> cjwatson, what about removed packages? i.e. https://bugs.edge.launchpad.net/malone/+bug/196783
<cjwatson> oh, except for removals - most recent in which it still exists I guess
<ubuntoid> Launchpad bug 196783 in malone "X-Launchpad-Bug header reports component=None for packages not in Hardy" [Undecided,New]
<cjwatson> you need to define an ordering of distroseries
<kiko> yeah, we do
<kiko> but this absolutely sucks
<cjwatson> if you do that, it's straightforward
<kiko> it's so expensive to actually calculate this for 100s of tasks
<kiko> cjwatson, what about packages that are introduced in pockets?
<kiko> cjwatson, we did that recently for the security fix for ssh, I believe?
<cjwatson> ok, ordering of distroseries/pocket combinations
<kiko> @3@!#!!@
<cjwatson> hardy-updates > hardy-security > hardy > gutsy-updates > etc.
<-- jam has quit (Ping timeout)
<kiko> yeah
* kiko chuckles
<kiko> it's really easy to put that into SQL