You are not logged in.

#1 2016-02-23 09:40:16

symen
Member
Registered: 2014-10-13
Posts: 10

Unformal repository of alpm (pacman) hooks

Pacman 5.0 recently added the possibility to add hooks, which allows for some neat integration with pacman. However almost no package uses hooks yet, so in the mean while I suggest posting our own hooks or ideas in this topic.

There is already a github repo with some useful hooks.

I've also quickly written two hooks for:

  • localepurge: which runs everytime a package installation / upgrade touches folders concerning localepurge. It tends to spit a lot of output and run even when not needed, but in my experience it ran fast enough for it not to be a concern.

  • dkms: which makes sure all dkms modules are compiled for every installed kernel each time modules or kernel headers are installed/updated. This could be optimised by passing matched files/folders to the hook script, though in the end dkms only compiles what is necessary so in practice this worked fine for me.
    You may still want to enable dkms.service to load dkms at boot (and as a fallback if the hook doesn't run or fails). If you don't care that much, you can use my dirty dkms-load.service instead, which only load dkms modules (and doesn't try to compile them to reduce disk IOs at boot).

Offline

#2 2016-02-23 09:52:30

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,860
Website

Re: Unformal repository of alpm (pacman) hooks

Moving to Community Contributions.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2016-02-23 11:19:53

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,392
Website

Re: Unformal repository of alpm (pacman) hooks

So....   dkms already has a hook in the testing repos.

And localepurge will give lots of errors if you have CheckSpace activated.  Use NoExtract instead.

Offline

#4 2016-02-23 17:05:58

symen
Member
Registered: 2014-10-13
Posts: 10

Re: Unformal repository of alpm (pacman) hooks

@Allan
Oh well, I made my life more complicated than needed it seems. Using NoExtract sounds indeed cleaner than localepurge (albeit a little less convenient to setup).
I made the dkms hook 10 days ago and didn't see that something had been done in the official package in the meantime.

Thanks for the input though!

Offline

#5 2016-02-23 17:39:42

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Unformal repository of alpm (pacman) hooks

The advantage of NoExtract is that it gets more stuff.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB