You are not logged in.
Pages: 1
Hello,
Is there a way to defined hooks that will be called by pacman before and after doing an upgrade ?
Something similar exists on debian and is very useful to automate the task of updating a version controlled /etc/ repository (etckeeper is doing that with git on debian, and I'm trying to port it to arch with either git or mercurial).
Thanks for any pointer.
Offline
Right now, the solution would be to write a pacman wrapper that does what you need. In the longer term, you should get on the pacman-dev ML and propose something, preferably with working patches.
Offline
Ok, thank you tom.
I'll try to have a look at the source and propose some solutions on pacman-dev...
Offline
Well, there are already package hooks, with the install scriptlets, but these are per packages.
What you want is the same thing, but globally? One scriptlet that would be run for every packages?
With the example you gave, it looks like file hooks would be more appropriate. It's already in Aaron TODO list :
* feature for 3.1: package file hooks *
I've been planning on this one for some time. Here's a simple rundown:
in /etc/pacman.d/hooks:
Hook /usr/include/* : /usr/bin/ctags -R /usr/include/*.h -f /usr/include/systags
This will allow us to make "global hooks" to simplify a lot of repetitive
install files (scrollkeeper, depmod, etc). This also allows us to move
ldconfig out of pacman entirely.
That could indeed be very useful in many situations. So if you manage to write a patch for this, it would be much appreciated
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Pages: 1