distribution.searchSourcePackages doesn't work for distributions without primary archives
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
I was attempting to traverse the API today to get from a private distribution to all of its member source packages. While I know the following functionality works (using e.g. `python-urllib3` as an example):
>>> pkg = distro.
>>> assert pkg is not None
>>>
I was experimenting with the `distro.
> source_match
> (required)
> Source package name substring match
Given that explanation, I would expect a search for a substring contained within the target package name to return a list that includes the target package. So, in this case, I would expect a search for, e.g., 'python', to include 'python-urllib3'. Here is what happens:
>>> source_packages = list(distro.
>>> len(source_
0
The problem isn't substrings - it's that the private distribution in question has no primary archive, and `Distribution. searchSourcePac kages` only looks for package names published in the primary archive (and the mostly-obsolete primary archive).
I'm not sure what to do about this - we may need to invent a way to designate certain PPAs as "official", which is something I thought about early on but there didn't seem to be a pressing need for it at the time.