[pacman-dev] [PATCH 4/4] use pacman-conf in scripts

Eli Schwartz eschwartz at archlinux.org
Sat Jan 13 23:21:48 UTC 2018


On 01/13/2018 11:50 AM, Andrew Gregory wrote:
> Because parsing pacman.conf is so difficult that even we can't do it
> right.
> 
> Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
> ---
>  scripts/completion/zsh_completion.in |  4 ++--
>  scripts/pacman-db-upgrade.sh.in      | 21 ++-------------------
>  scripts/pacman-key.sh.in             |  2 +-
>  3 files changed, 5 insertions(+), 22 deletions(-)

Our bash completion should also be updated to use pacman-conf, as
currently it uses a glorious hack to find the completions for -Sl which
involves verbosely printing all packages ever and using `cut|sort -u` to
extract repo names and dedupe them.

Of course, this was still more accurate than the zsh config file parsing.

I'd also like to see some way of listing group names for completing -Qg,
I guess, although that isn't really something to solve via better
*configuration* parsing, so it is probably offtopic for this.

-- 
Eli Schwartz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20180113/753f5284/attachment-0001.asc>


More information about the pacman-dev mailing list