Problem:
We are migrating to pulp v3 and everything seems to be working properly, however we are struggling to replicate a command we use to determine the most recent version of a package in a specific repo for an automation we have, in pulp v2 the command was:
pulp-admin rpm repo content rpm --str-eq=name=omi --repo-id=azure
However in pulp v3 there seems not to be a command that correlates rpm package with specific repo, as per my research:
- Closest I have got is to list all omi packages but this is across all repos and cli does not have any parameter to specify repo id:
pulp rpm content list --name-in omi --field location_href
- The other option is almost impossible to use:
pulp rpm repository content list --repository test-azure --limit 2000
with this one we need to set a limit of at least 2000 for the cli to return all packages this takes a lot of time and then we need to use jq to parse and try to find what we need.
First option is quicker but since we cannot correlate a repo is useless.
What can we do?
Pulpcore version:
“core”: “3.48.0”
Pulp plugins installed and their versions:
“versions”: {
“rpm”: “3.25.1”,
“core”: “3.48.0”,
“file”: “3.48.0”,
“certguard”: “3.48.0”
},
Operating system - distribution and version:
RHEL 9
Other relevant data: