pulp_rpm icon indicating copy to clipboard operation
pulp_rpm copied to clipboard

Allow users to filter on package filename in /content/rpm/packages/ for pulp3

Open pulpbot opened this issue 4 years ago • 2 comments

Author: jcabrera (jcabrera)

Redmine Issue: 4879, https://pulp.plan.io/issues/4879


Add the possibility to query the file name ("location_href"?) of a package in the contents.

This simplifies the use of jq as we get directly the good href with the use of a GET query

 http :24817/pulp/api/v3/content/rpm/packages/?filename=name-version-release.arch.rpm

I prefer the query version than using jq

http :24817/pulp/api/v3/content/rpm/packages/ | jq -r '.results[] | select( .location_href == "name-version-release.arch.rpm")'

There could be a limitation when there are to much contents because the pagination prevents to look for all contents.

pulpbot avatar Dec 22 '21 15:12 pulpbot

From: daviddavis (daviddavis) Date: 2019-05-24T15:19:57Z


Just FYI, file name of a package is different than location_href. Location_href could include a path like "Packages/v/VirtualGL-devel-2.5.2-1.el7.x86_64.rpm".

pulpbot avatar Dec 22 '21 15:12 pulpbot

Description from a duplicate: "Today, there is no filename filter on the package list endpoint. I think there are a couple fields (location_href or relative_path) that store a filename-like value for each package."

dralley avatar Apr 20 '23 15:04 dralley

Fixed by https://github.com/pulp/pulp_rpm/pull/3216

ggainey avatar Jan 25 '25 22:01 ggainey