=== frankban|afk is now known as frankban === danilos` is now known as danilos [10:44] Hello! I have a question about a possible bug in LP API, maybe I'm just doing something wrong [10:45] I'm doing such a thing: [10:46] Having a binary package name, I do a getPublishedBinaries() on the archive to get the binary_package_publishing_history and then accessing its source package through getLatestSourcePublication() - all works fine here so far [10:46] So I have now the source package that generated the selected binary package [10:47] But now, on that source_package_publishing_history when I call getPublishedBinaries() to fetch ALL the binaries it generates (besides the one I queried for), it returns an empty set [10:47] No binaries [10:47] Even though if I do a query directly for the source package in the archive, I see all the binaries there [10:48] Just not when the source_package_publishing_history object is returned through getLatestSourcePublication() [10:48] Does anyone know why? [10:52] SPPH.getPublishedBinaries only gives you active binary publications [10:52] So if they've been e.g. superseded it won't return them [10:53] In fact this is documented: https://launchpad.net/+apidoc/devel.html#source_package_publishing_history-getPublishedBinaries [10:56] This is certainly an annoyance. It might be nice if there were an option to pass active_binaries_only=False down through SPPH.getPublishedBinaries -> PublishingSet.getBinaryPublicationsForSources -> PublishingSet._getSourceBinaryJoinForSources [10:57] Ok, yes, but the strange thing is that when I fetch the SPPH for the selected source and do getPublishedBinaries I get all the requested binaries, but when I do the very same thing on the SPPH that's returned by getLatestSourcePublication() I get 0 [10:57] Are you sure it's the same SPPH? It must not be. [10:57] Because getPublishedBinaries doesn't know how you got the SPPH in question. [10:58] Compare .self_link [10:59] Here's what I did in an lp-shell session (I cut out the unnecessary bits) [10:59] http://paste.ubuntu.com/16316937/ [11:00] So I make sure I get the SPPH for the source that has the same name and version as the one returned through getLatestSourcePublication() [11:02] If they're not the same SPPH then I guess they should? As both queries should lead to the same thing I suppose? [11:35] sil2100: and what's src2[0]? [11:36] It's the result of ppa.getPublishedSources() with the same source name and version as the one I got from going through BPPH->SPPH [11:37] ppa.getPublishedSources(source_name="account-plugins", version="0.12+15.04.20160126-0ubuntu1", exact_match=True) <- both the name and version are exactly the same as what I got from the SPPH in the earlier steps, the one that had 0 binaries published [11:37] And suddenly it has 96 binaries [11:37] sil2100: I'm trying to get you to look at src2[0] [11:37] sil2100: Compare it with src [11:38] Oh [11:38] sil2100: The actual link, not its contents [11:38] Ooooh [11:38] Ah, I get it now [11:38] sil2100: So it matters here whether you're looking at the archive where it was originally built, or the one it's now published in [11:38] Damn, the SPPH one is the first build that resulted in the binaries, which is already deleted from the silo PPA [11:39] Yeah, all makes sense now [11:39] Thanks, this does complicate the logic of my scripts, but at least I know why I was getting these different results [11:39] :) === pavlushka is now known as pavlushka2 === pavlushka2 is now known as pavlushka === pavlushka is now known as z3ki === z3ki is now known as pavlushka [17:01] help.launchpad.net is being spammed. Someone also took my edit away so I cannot delete the spam https://help.launchpad.net/Norton%20care%20@@!1844-8O1-3966*!!!!**Norton%20phone%20Number%20uSa%20HELP%20desk%20360%20customer%20care%20number,Norton === frankban is now known as frankban|afk === pavlushka is now known as z4ki === z4ki is now known as pavlushka