--edit after testing this out, while interesting and something I think could make a nice feature in pacman - it proves way too slow for use currently as anything more than a proof of concept. Still a very cool project!
$ hyperfine --warmup 10 'pacman -Q' 'paclabel -Q'
Benchmark #1: pacman -Q
Time (mean ± σ): 35.9 ms ± 3.3 ms [User: 6.5 ms, System: 4.9 ms]
Range (min … max): 33.3 ms … 42.3 ms 77 runs
Benchmark #2: paclabel -Q
Time (mean ± σ): 4.559 s ± 0.043 s [User: 2.802 s, System: 1.687 s]
Range (min … max): 4.523 s … 4.666 s 10 runs
Summary
'pacman -Q' ran
127.15 ± 11.65 times faster than 'paclabel -Q'
$ pacman -Q | wc
1033 2066 20117
It currently doesn't work with "pacman -Qs", making it essentially useless for me, but I'll keep an eye on it.
]]>paclabel is a tiny pacman wrapper. It makes possible to attach custom text "labels" to packages. The labels will be shown while querying the packages using -Q (unless options like -q or -k are passed, of course).
Motivation
The author finds it useful to be able to attach things like installation reason to a package.
This is something I've often found myself wanting to do, install certain packages for certain train of thoughts and interests at the moment - so they are explicitly installed. However later down the road I may not need them anymore for whatever reason. Having a label assigned to the package allows for user responsive grouping in logical layers.
I am rather loathe to wrap pacman in anything that's not official though. Would there be any traction from the powers that be for this being considered as a possible feature enhancement to pacman?
]]>