[arch-general] Problem with pacman hooks, alphabetic order.
Hello Everybody, I have some trouble with pacman hooks. Arch is going to use pacman hooks in every package. etckeeper was one of the first package that use pacman hooks, without any trouble. But now it becomes more tricky to run. My Problem is that the pacman hooks run in alphabetic order. And not in a Prirority order. Here is an example: [2016-05-13 23:49] [PACMAN] starting full system upgrade [2016-05-13 23:49] [ALPM] running 'etckeeper-pre-install.hook'... [2016-05-13 23:49] [ALPM] transaction started [2016-05-13 23:49] [ALPM] upgraded ca-certificates-utils (20150402-1 -> 20160507-1) [2016-05-13 23:49] [ALPM] upgraded ca-certificates-mozilla (3.23-3 -> 3.23-4) [2016-05-13 23:49] [ALPM] upgraded ca-certificates-cacert (20140824-2 -> 20140824-3) [2016-05-13 23:49] [ALPM] upgraded ca-certificates (20150402-1 -> 20160507-1) [2016-05-13 23:49] [ALPM] upgraded glib2 (2.48.0-2 -> 2.48.1-1) [2016-05-13 23:49] [ALPM] upgraded gnupg (2.1.12-1 -> 2.1.12-2) [2016-05-13 23:49] [ALPM] upgraded nss (3.23-3 -> 3.23-4) [2016-05-13 23:49] [ALPM] transaction completed [2016-05-13 23:49] [ALPM] running 'check_pacfile.hook'...<<< My Own hook [2016-05-13 23:49] [ALPM] running 'etckeeper-post-install.hook'... [2016-05-13 23:49] [ALPM] running 'sync.hook'... <<< My Own hook [2016-05-13 23:49] [ALPM] running 'texinfo-install.hook'... [2016-05-13 23:49] [ALPM] running 'update-ca-trust.hook'... In this log output we can see that etckeeper-post-install.hook is run before texinfo-install.hook and update-ca-trust.hook. This is problematic because update-ca-trust.hook has update the /etc/ssl/certs/java/cacerts but this file was not commited by the etckeeper-post-install.hook because it is run to early. The hooks run in alpabetic order. I have tested to rename the etckeeper-post-install.hook to "99-etckeeper-post- install.hook" but it does not help, because numbers run before characters. How this problem could be solved? Yes I know I can number every hook but I prefer a more upstream solution.. Sincerly Yours Carsten Feuls
On 14-05-16 01:15, Carsten Feuls wrote:
Hello Everybody,
I have some trouble with pacman hooks. Arch is going to use pacman hooks in every package. etckeeper was one of the first package that use pacman hooks, without any trouble. But now it becomes more tricky to run. My Problem is that the pacman hooks run in alphabetic order. And not in a Prirority order.
How this problem could be solved? Yes I know I can number every hook but I prefer a more upstream solution..
Sincerly Yours Carsten Feuls
I do think there may be better way to solve this then adding a priority system for hooks. this is current trigger used by etckeeper hooks : [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = Package Target = * I think the purpose of etckeeper is to keep track of changes in the /etc folder, right? How about using this as trigger : [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = File Target = /etc/*
2016-05-14 1:15 GMT+02:00 Carsten Feuls <liste@carstenfeuls.de>:
I have tested to rename the etckeeper-post-install.hook to "99-etckeeper-post- install.hook" but it does not help, because numbers run before characters.
Well, the obvious solution is to rename it to "zz-etckeeper..", but of course that also isn't a great long-term solution. I think you should file a bug report. Maybe the package maintainer can come up with a better fix, and otherwise they can get in touch with the Pacman developers for an upstream enhancement.
Carsten Feuls <liste@carstenfeuls.de> on Sat, 2016/05/14 01:15:
Hello Everybody,
I have some trouble with pacman hooks. Arch is going to use pacman hooks in every package. etckeeper was one of the first package that use pacman hooks, without any trouble. But now it becomes more tricky to run. My Problem is that the pacman hooks run in alphabetic order. And not in a Prirority order.
Want to try etckeeper 1.18.3.r27.geeae1aa-1? -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];) putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}
On 14-05-16 01:15, Carsten Feuls wrote:
Hello Everybody,
I have some trouble with pacman hooks. Arch is going to use pacman hooks in every package. etckeeper was one of the first package that use pacman hooks, without any trouble. But now it becomes more tricky to run. My Problem is that the pacman hooks run in alphabetic order. And not in a Prirority order.
How this problem could be solved? Yes I know I can number every hook but I prefer a more upstream solution..
Sincerly Yours Carsten Feuls
I do think there may be better way to solve this then adding a priority system for hooks. this is current trigger used by etckeeper hooks : [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = Package Target = * I think the purpose of etckeeper is to keep track of changes in the /etc folder, right? How about using this as trigger : [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = File Target = /etc/*
LoneVVolf <lonewolf@xs4all.nl> on Thu, 2016/05/19 17:24:
On 14-05-16 01:15, Carsten Feuls wrote:
Hello Everybody,
I have some trouble with pacman hooks. Arch is going to use pacman hooks in every package. etckeeper was one of the first package that use pacman hooks, without any trouble. But now it becomes more tricky to run. My Problem is that the pacman hooks run in alphabetic order. And not in a Prirority order.
How this problem could be solved? Yes I know I can number every hook but I prefer a more upstream solution..
Sincerly Yours Carsten Feuls
I do think there may be better way to solve this then adding a priority system for hooks.
this is current trigger used by etckeeper hooks : [Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = Package Target = *
I think the purpose of etckeeper is to keep track of changes in the /etc folder, right?
How about using this as trigger :
[Trigger] Operation = Install Operation = Upgrade Operation = Remove Type = File Target = /etc/*
That is what current version does. Well, except that the install root is omitted, so correct target is just 'etc/*'. But that does not solve the problem: Think of etckeeper hook runs first, followed by ca-certificates hook. The changes are not committed. That's why we want prefix for order, so etckeeper hook can run last. -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];) putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}
participants (4)
-
Carsten Feuls
-
Christian Hesse
-
LoneVVolf
-
Sebastiaan Lokhorst