Open anaselli opened 6 months ago
Imagine the List() method as an alternative to the dnf repoquery
command, rather than dnf search
command.
Matching in this context is akin to matching files with glob patterns in the shell. To obtain a list of packages with names containing dnf
you need to add wildcards to the pattern, such as *dnf*
.
To find out what repository each returned package comes from, consider adding repo_id
to the package_attrs
list.
It isn't clear to me how a search of a package works. using the following options:
I'd expect to have all the packages containing dnf. But the result is dnf-0:4.14.0-1.mga9.noarch twice (one is the installed and the latter i don't know from which list of packages is got (it should not be from available, and neither from updates).
The first question is where the pattern should match. I mean according to documentation "with_binaries", "with_filenames", "with_nevra", "with_provides", "with_src" are all True at default. And that seems to say that the pattern should match (i guess "be contained") every where. But as said above it does not.
Let's try to see filenames, according to documentation options should be:
But that produces no output. Let's try with binaries:
And again dnf-0:4.14.0-1.mga9.noarch twice. Trying setting "with_src" produces nothing again.
Could you explain better how the pattern should be written and if i'm wrong in something?