[Spacewalk-list] findByNvrea method: documentation x practice

Nilton Moura redhat at nmoura.eti.br
Fri Feb 10 13:49:25 UTC 2012


Hi.

The description of findByNvrea API method says: "Lookup the details for
packages with the given name, version, release, architecture label, and
(optionally) epoch."

I did a test uploading a package from a CentOS channel to a test channel in
Spacewalk, which exist in a Red Hat channel in Spacewalk. So, I have two
packages a2ps-4.13b-57.2.el5.x86_64.rpm: one from Red Hat, other from
CentOS.

In this scenario, I print in a test script the return of
client.packages.findByNvrea(key, 'a2ps', '4.13b', '57.2.el5', '',
'x86_64'), and the result is only the first package I've uploaded:

[{'arch_label': 'x86_64', 'epoch': '', 'version': '4.13b', 'last_modified':
<DateTime u'20120201T00:00:00' at 1ff3e560>, 'provider': 'Red Hat Inc.',
'release': '57.2.el5', 'path':
'redhat/1/efa/a2ps/4.13b-57.2.el5/x86_64/efaf8e3e3b38fb283a471613f6f4346e/a2ps-4.13b-57.2.el5.x86_64.rpm',
'id': 2, 'name': 'a2ps'}, {'arch_label': 'x86_64', 'epoch': '', 'version':
'4.13b', 'last_modified': <DateTime u'20120210T00:00:00' at 1ff3e1b8>,
'provider': 'CentOS', 'release': '57.2.el5', 'path':
'redhat/1/aaa/a2ps/4.13b-57.2.el5/x86_64/aaab3cca2ba9a83c587ddef78ab456aa/a2ps-4.13b-57.2.el5.x86_64.rpm',
'id': 20335, 'name': 'a2ps'}]

So, according to the documentation, I think in this case the result should
be the two a2ps packages, not only the first match. Am I correct?

Thanks,
Nilton Moura.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20120210/a7179ec8/attachment.htm>


More information about the Spacewalk-list mailing list