Hide Forgot
Description of problem: Api /repositories/<id>/get_package_by_nvrea/ returns wrong results. It composes OR query instead of AND query from nvrea data. Version-Release number of selected component (if applicable): pulp-0.0.265-1.fc16.noarch Steps to Reproduce: 1. create repo http://tstrachota.fedorapeople.org/dummy_repos/zoo/ 2. run curl -H "Content-Type: application/json" -H "Accept: application/json" -# -X POST -d '{"nvrea": [{"name": "frog"}, {"version":"0.1"}]}' -k -u admin:admin https://localhost/pulp/api/repositories/ACME_Corporation-zoo-zoo/get_package_by_nvrea/ Actual results: Returns all packages in version 0.1 Expected results: Should return only frog-0.1-1.noarch.rpm Additional info:
commit f3ac6dc5173e396e34eeffc68e1b4a40d7b211f3
build: 0.282
[root@pulp-v1-1-server ~]# rpm -q pulp pulp-1.1.4-1.fc16.noarch [root@pulp-v1-1-server ~]# curl -H "Content-Type: application/json" -H "Accept: application/json" -# -X curl: option -X: requires parameter curl: try 'curl --help' or 'curl --manual' for more information [root@pulp-v1-1-server ~]# curl -H "Content-Type: application/json" -H "Accept: application/json" -# -X POST -d '{"nvrea": [{"name": "frog"}, {"version":"0.1"}]}' -k -u admin:admin https://localhost/pulp/api/repositories/zoo/get_package_by_nvrea/ {"frog-0.1-1.noarch.rpm": {"size": 2439, "license": "GPLv2", "vendor": "", "name": "frog", "repo_defined": true, "buildhost": "smqe-ws15", "checksum": {"sha256": "155419d86251249233f9d8016f6012e138ef3a3f5c679c8685de84460e32e3e3"}, "requires": [], "epoch": "0", "download_url": "https://pulp-v1-1-server.usersys.redhat.com//pulp/repos/zoo/frog-0.1-1.noarch.rpm", "filename": "frog-0.1-1.noarch.rpm", "repoids": ["zoo"], "version": "0.1", "provides": ["frog"], "_ns": "packages", "release": "1", "group": "Internet/Applications", "_id": "1b1bd566-f770-459e-890e-b759d15fe074", "arch": "noarch", "id": "1b1bd566-f770-459e-890e-b759d15fe074", "description": "A dummy package of frog"}}[root@pulp-v1-1-server ~]#
Pulp v1.1 Release