You are not logged in.

#1 2020-06-03 04:14:16

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 412
Website

paclabel project - assign tags to packages when installing

Stumbled across this very interesting project on github by Kharacternyk and am wondering if anyone has any experience with it? Or any thoughts in general? Quotes below from same page:

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?


"the wind-blown way, wanna win? don't play"

Offline

#2 2020-06-03 05:00:54

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: paclabel project - assign tags to packages when installing

It looks interesting. The labels are dropped in a single file and "Manual editing of the file is perfectly fine.", which looks very comfortable. You don't have to use it all the time, you can just add comments as you please.

It currently doesn't work with "pacman -Qs", making it essentially useless for me, but I'll keep an eye on it.

Offline

#3 2020-06-09 03:29:31

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 412
Website

Re: paclabel project - assign tags to packages when installing

@awebb, i see thanks for feedback, I'll install and test it out. Not working with -Qs does make it less useful - though I suppose as long as it works with just -Q one could always pipe it to something like fzf for a way to "search" -- though without the descriptions. I wonder why this limitation exists in the first place?

--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

Last edited by CarbonChauvinist (2020-06-09 04:17:37)


"the wind-blown way, wanna win? don't play"

Offline

Board footer

Powered by FluxBB