0

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?

1 Answer 1

1

I can get the source files through the following pathway:

  1. 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)

  2. In any source_package_publishing_history, call the sourceFileUrls operation. For example, for the latest version of grep in Trusty, call https://api.launchpad.net/1.0/ubuntu/+archive/primary/+sourcepub/3832982?ws.op=sourceFileUrls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.