falconindy / expac

alpm data extraction utility
91 stars 15 forks source link

False positives #14

Closed baskerville closed 10 years ago

baskerville commented 10 years ago

If cower-git is installed on my system, the following command: expac -Q %v cower outputs the version of cower-git.

falconindy commented 10 years ago

Working as intended. Just the same as you can 'pacman -S pacman-contrib' (which installs pacman), expac looks at providers, not just exact package names.

I suppose you want a way to disable this?

baskerville commented 10 years ago

I suppose you want a way to disable this?

Yes.

Earnestly commented 10 years ago

I agree, a way to suppress provides would be very nice.

leahneukirchen commented 10 years ago

I'd like to have this too, then one must not parse "pacman -Si" to extract information about an exact package name.

rmarquis commented 10 years ago

Exact package name can be obtained with "expac -Q %n".

Also, could someone provide a detailed user case? I'm extensively relaying on expac in some other project, but don't see how the proposed feature could be useful.

falconindy commented 10 years ago

Not really.

$ expac -Q %n pacman
pacman-git

Because pacman-git provides pacman, it's returned as a result.

JohnFrazier commented 10 years ago

Removing the call to alpm_find_satisfier would better match pacman behavior for these queries.

+ expac -Q %n sh svn
bash
subversion
+ pacman -Q sh svn
error: package 'sh' was not found
error: package 'svn' was not found
falconindy commented 10 years ago

Sure, this makes sense. Searching will pull in providers, so it stands to reason that a direct query should be just that -- direct.

Changed in c67a550db509209e0044f9fc3581fdfe393622ce

rmarquis commented 8 years ago

FYI, it seems a recent patch on the mailing list is modifying the way pacman queries providers.

I'm not sure if it would actually be relevant to revert to the old behavior to match the new behavior here.