Bug 16681

Summary: urpmq fuzzy search finds non matching packages
Product: Mageia Reporter: claire robinson <eeeemail>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal    
Version: 5   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: urpmi CVE:
Status comment:

Description claire robinson 2015-09-01 14:09:45 CEST
This appears to be a bug. Looking for "3d" packages..

$ urpmq -ya 3d | grep -v 3d
banshee-community-extensions
kmplayer
kmplayer-npplayer

Noticed in Mageia 5 

$ rpm -q urpmi
urpmi-8.06-1.mga5

$ rpm -q perl-URPM
perl-URPM-5.06-1.mga5

Reproducible: 

Steps to Reproduce:
Comment 1 Jani Välimaa 2015-09-01 17:21:33 CEST
Seems that 'urpmq -y' also searches from version and release tag.

$ urpmq -yf banshee-community-extensions
banshee-community-extensions-2.4.0-6.e5b4e02ea73b6687c79436e8814f277b__3d__4e8a07.6.mga5.x86_64

$ urpmq -yf kmplayer
kmplayer-0.11.__3d__-6.mga5.x86_64
kmplayer-npplayer-0.11.__3d__-6.mga5.x86_64
Comment 2 Thierry Vignaud 2015-09-02 12:49:24 CEST
Indeed, urpm::select::_search_packages() does matching against fullnames.
If you want more control on what you're looking for, use urpmf.
eg: urpmf --name 3d
If you compare urpm[fq] output, you'll see that in that case urpmf doesn't output the packages you're complaining about.

Also urpmf --name is faster than urpmq -y

Status: NEW => RESOLVED
Resolution: (none) => INVALID

Comment 3 claire robinson 2015-09-02 14:20:34 CEST
Maybe so, but why search full version & release tag and not display it?

urpmf also returns duplicates on x86_64 though from 32bit medias.

eg.

$ urpmf --name 3d | grep drak3d
drak3d
libdrak3d
drak3d
libdrak3d

$ urpmq -ya 3d | grep drak3d
drak3d
libdrak3d
Comment 4 Thierry Vignaud 2015-09-02 15:36:33 CEST
1) about what is displayed:

read the doc:
http://search.cpan.org/~tvignaud/urpmi-8.06/pod/8/urpmq.pod#Output_Options
=> use urpmq -r or -f
(which will also answer your second question)


2) about so called "duplicates":

Urpmq explicitly removes "dups" b/c it only.
But if you requires additional information, the dups will remain as "name+extra_tag" is now unique
eg:
- urpmq -S rpm
- or the above "urpmq -r rpm" or  "urpmq -f rpm"

As urpmf can reports files & other info, we cannot remove remove "duplicates" (which really are not as eg: 64bit rpm contains /lib64/rpm-plugins whereas 32bit one contains /lib/rpm-plugins)