=== sarnold_ is now known as sarnold
tsimonq2hi, I have a question about the API18:50
tsimonq2I am looking to build an app that scans certain packages in the supported releases of Ubuntu for new versions and if so, then prints a message18:50
tsimonq2is there a way in the API to see a package version?18:51
tsimonq2I see the entry for Xenial, with it being the current release, but how about implementing Trusty, Vivid, and Wily?18:52
tsimonq2if someone could get back to me soon, that would be great. THanks!18:52
cjwatsonI would suggest using https://launchpad.net/+apidoc/devel.html#archive-getPublishedSources with order_by_date=True, and work backward until you hit stuff you've previously seen (being aware that you might see the same publication twice)18:52
cjwatsontrusty, vivid, and wily are perfectly well implemented :)18:52
tsimonq2cjwatson: all I see is current_version, what about calling it for those previous codenames?18:53
cjwatsoncurrent_version on what object, please?18:53
cjwatsonthere is no object with an attribute by that name on the API18:54
cjwatsondo you mean current_series?18:54
tsimonq2this is my current code: https://raw.githubusercontent.com/tsimonq2/lububot/master/test.py18:54
tsimonq2I have to go now, I will be back in a couple of hours, please let me know18:54
tsimonq2thank you18:54
cjwatsontsimonq2: use ubuntu.getSeries(name_or_version='wily') etc.18:54
tsimonq2ok, thanks18:55
cjwatsontsimonq2: that code will be extremely very very very slow on lots of packages18:55
tsimonq2hmm pok18:55
cjwatsonI mean, if you're calling it on lots of packages18:55
cjwatsonmany many round trips18:55
tsimonq2yep :)18:55
cjwatsonif it's only a few, that's ok18:55
tsimonq2I have a plan ;)18:55
cjwatsonbut if you're intending to check lots of packages, my recommendation above standas18:55
cjwatsonarchive.getPublishedSources(order_by_date=True, status="Published") and iterate18:56
cjwatsonalso, you should probably be using status="Published" in any case18:57
=== alai888 is now known as alai
tsimonq2cjwatson: hmm, what if I wanted to do a lot of packages?23:10
tsimonq2cjwatson: any faster alternative?23:10
cjwatsontsimonq2: so, for that you're going to need to explain a bit more about exactly what your app is going to do23:12
tsimonq2cjwatson: I would like my app(Python) to idle and print the package name when there is an update to a large amount of packages23:14
tsimonq2or to that package23:14
tsimonq2so when a package gets an update, I want an output23:14
tsimonq2similar to queuebot23:15
sarnoldisn't there a -changes mail list of some sort that publishes updates and new packages?23:16
sarnolde.g. https://lists.ubuntu.com/mailman/listinfo/trusty-changes23:16
cjwatsontsimonq2: so, there aren't currently good solutions that don't involve polling, but if you're prepared to poll every n minutes or something, then I gave you the faster alternative above - archive.getPublishedSources(order_by_date=True) basically tells you about everything recent in the archive, a bit like a fairly stupid RSS feed, and you walk back through it until you reach the thing you last heard of or a date cut-off23:16
cjwatson(or, yes, if you're prepared to subscribe to a mailing list as part of this then you can do that, but that's cumbersome from an app23:17
tsimonq2cjwatson: but then how would I parse that for the packages that I want?23:17
wgrantWhat do you mean?23:18
cjwatsontsimonq2: each entry in the collection is a source_package_publishing_history, so you look at the source_name attribute or whatever it's called23:18
wgrantIt returns a list of entries, and you'd check the package name in each.23:18
cjwatsonyou don't need to "parse"23:18
cjwatsonnow, if you're planning for this app to be installed on lots and lots of systems, er, please warn us23:19
cjwatson'cos maybe we want something more scalable in that kind of case ...23:19
tsimonq2cjwatson: no, actually I plan on this being an IRC bot23:19
cjwatson(and you want status="Published" on that too, so that you don't get entries for things that are superseded etc.)23:19
cjwatsonright, this should be fine for an IRC bot.  it's what the ddebs.ubuntu.com publishing backend uses to keep up with the archive23:20
tsimonq2cjwatson: so I want it to be as frequent as possible updates for that23:20
cjwatsonand indeed we designed it for that purpose23:20
tsimonq2cjwatson: so as I am not that familiar with working with APIs, how would I carry out that task(in code terms)?23:21
tsimonq2cjwatson: so maybe source_package_publishing_history.sourcename?23:24
tsimonq2cjwatson: or what?23:25
tsimonq2cjwatson: but more specifically, when using the docs, how do I use the URLs given?23:28
tsimonq2cjwatson: I just lack this knowledge, so if you could point me in the right direction, that would be awesome23:30
tsimonq2or anyone else23:36
wgranttsimonq2: https://help.launchpad.net/API/launchpadlib23:39
tsimonq2wgrant: thank you23:47
sarnoldhttps://bugs.launchpad.net/aptdaemon/+bug/659438 got some spam and fairly impolite replies from users; can this bug be made silent in some fashion? perhaps https://launchpad.net/~tegosfentasio and https://launchpad.net/~jc4 and https://launchpad.net/~ishani-infoware don't need to participate in launchpad any more either (comments 170, 172, 174)23:53
wgrantsarnold: Well that's pretty spectacular.23:54
sarnoldpleasant people all around, right?23:55
wgrantsarnold: I've removed the comments, let me know if it continues.23:55
sarnoldwgrant: thanks!23:55
wgrantAnd all from some innocuous spam.23:55
sarnoldno kidding; even without understanding ukranian it was obviously spam.. sigh.23:56

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!