I'm trying to write a Python script that downloads the latest package from Launchpad using the launchpadlib pip. For a project like grep, I want to be able to download the source packages for a distribution, like the files seen here https://launchpad.net/ubuntu/trusty/+source/grep . Instead, I can only download the files seen here https://launchpad.net/grep/main , which seem to be outdated when compared to what is with in the distributions. Is this possible with the Launchpad API?
I can get the source files through the following pathway:
Call https://api.launchpad.net/1.0/ubuntu/+archive/primary?ws.op=getPublishedSources&pocket=Release&source_name=grep&exact_match=true to get all source packages for
grep
(this can be filtered down in the URL itself by specifying the link to the distro series)In any
source_package_publishing_history
, call thesourceFileUrls
operation. For example, for the latest version ofgrep
in Trusty, call https://api.launchpad.net/1.0/ubuntu/+archive/primary/+sourcepub/3832982?ws.op=sourceFileUrls.