Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#47990 - [pacman] pacman -Fs prints wrong file

Attached to Project: Arch Linux
Opened by Brian BIdulock (bidulock) - Tuesday, 02 February 2016, 03:34 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 02 February 2016, 05:52 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

pacman -Fs is printing the wrong file.
It appears to be printing the first file in the list instead of the matched file.

Additional info:
* pacman 5.0.0
* with shipped config file


Steps to reproduce:

$ sudo pacman -Fy
$ pacman -Fs .desktop 0ad
community/0ad a19-3
usr/bin/0ad

# should print:
community/0ad a19-3
usr/share/applications/0ad.desktop

This task depends upon

Closed by  Doug Newgard (Scimmia)
Tuesday, 02 February 2016, 05:52 GMT
Reason for closing:  Not a bug
Comment by Doug Newgard (Scimmia) - Tuesday, 02 February 2016, 04:46 GMT
why are you using ".desktop 0ad"? That makes no sense. It's looking for a filename called ".desktop".
Comment by Brian BIdulock (bidulock) - Tuesday, 02 February 2016, 05:21 GMT
So, why is it then printing usr/bin/0ad ?

But, "pacman -Fs goofy 0ad" still prints

community/0ad a19-3
usr/bin/0ad

should it not print nothing?

Try the output of "pacman -Fsx '.*\.desktop' 0ad".

Instead of just .desktop files in package 0ad, it prints .desktop files and files containing 0ad in all packages.

Doesn't seem to be working right.
Comment by Doug Newgard (Scimmia) - Tuesday, 02 February 2016, 05:34 GMT
It's searching for a file called ".desktop" and another one called "0ad". Looks correct to me. You seem to be thinking this is an "AND" operation. It's not.

Edit, or maybe you're thinking you can give it a package name as an argument? Not sure what the thought process is here.
Comment by Brian BIdulock (bidulock) - Tuesday, 02 February 2016, 05:46 GMT
What I am really trying to do is find a list of all of the packages with a file glob of "/usr/share/applications/*.desktop". I suppose I have misinterpreted the documentation, which is about as crude as the option. I will write an awk script or use libalpm directly. Please close.
Comment by Doug Newgard (Scimmia) - Tuesday, 02 February 2016, 05:52 GMT
pkgfile may be better suited for that.

Loading...