falconindy/expac — Issue #2: Add an equivalent of pacman's -Qp option
Author: seschwar
Created: 2011-10-20 16:46:50+00:00
State: open

Pacman's query operation has a `-p` or `--file` option, which instead of querying the DB entry, allows querying package files directly:

$ pacman -Qi expac | awk -F '[[:space:]]*:[[:space:]]*' '/Name/{print $2}'
expac
$ expac -Q %n expac
expac
$ cd /var/cache/pacman/pkg
$ pacman -Qip expac-0.07-1-i686.pkg.tar.xz | awk -F '[[:space:]]*:[[:space:]]*' '/Name/{print $2}'
expac
$ expac -Qp %n expac-0.07-1-i686.pkg.tar.xz
expac: invalid option -- 'p'