Comment 0 for bug 1983515

Revision history for this message
Dan Ryan (techalchemy) wrote :

following up on #1983514 -- I am looking for a way to retrieve all of the source packages associated with a private distribution.

I have experimented with the distribution's `searchSourcePackages()` operation hoping that I could pass for example single letter substrings or a wildcard, but no matter what I pass to the operation I receive 0 results (yes I am authenticated).

It seems that individual source packages do have a key pointing directly to the distribution itself:

>>> pkg = distro.getSourcePackage(name="python-urllib3")
>>> assert pkg.distribution is not None
>>> pkg.distribution.resource_type_link
'https://api.launchpad.net/devel/#distribution'

However, the distribution exposes no API for traversing its source packages unless you already know what they are.