Upon further investigation towards todays updates, specifically gtk-update-icon-cache, I noticed something oddly similar to systemd service files [0] compared to pacman hook files, and the way it goes further than just sysusers and tmpfiles [1]. So it is not clear to me how pacman applys hooks without systemd. This brings me to the integration of hooks into offical arch packages [2], which accounts for more than 2,000+ packages. Pacopts seems to somewhat mitigate this, However it needs to take hooks into account. applysys for example will only check /usr/lib/sysusers.d, however it doesn't check /usr/share/libalpm/hooks or /etc/pacman.d/hooks. and applytmp will only work if the files are in /usr/lib/tmpfiles.d/ (if you have this path defined in /etc/pacman.conf by NoExtract, you might as well remove it from there because it won't work otherwise).

This is just part 1 of pacman hooks, I strongly suspect that part 2 will have more systemd involvement [3]

[0] https://www.freedesktop.org/software/systemd/man/systemd.service.html
[1] https://wiki.archlinux.org/index.php/DeveloperWiki:Pacman_Hooks
[2] https://www.archlinux.org/todo/hooks-part-1/
[3] https://bbs.archlinux.org/viewtopic.php?id=214835

References:
http://obarun.org/forum/viewtopic.php?id=77
http://obarun.org/forum/viewtopic.php?pid=748# p748 :)

So now the trouble is completly resolved. ( i hope )

@ however it doesn't check /usr/share/libalpm/hooks or /etc/pacman.d/hooks
pacman hook [0] work as it : when pacman install/touch a particular directory/files define by the Target variable on /usr/share/libalpm/*.hooks, it call a particular program/actions define by the Exec variable on /usr/share/libalpm/*.hooks. So for example this is the hook file for applysys :
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = usr/lib/sysusers.d/*.conf

[Action]
Description = Updating system user accounts...
When = PostTransaction
Depends = pacopts
Exec = /bin/sh -c 'for conf in $(ls /usr/lib/sysusers.d/); do /usr/bin/pacopts applysys "$conf" ; done'
NeedsTargets
When pacman install a file in /usr/lib/sysusers.d/ , the hook applysys is applied and launch the Exec command meaning pacopts applysys. very simple

@ applytmp will only work if the files are in /usr/lib/tmpfiles.d/ (if you have this path defined in /etc/pacman.conf by NoExtract, you might as well remove it from there because it won't work otherwise)
right, this behaviour was necessary before the change of pacopts, but for now the NoExtract behaviour can be removed and should be removed. The pacman.conf change will take place on the next iso release to have this behaviour by default.

The time tell us if a trouble can exist to parse some particular tmp/sys file. After a few weeks of use , pacopts, apparently, do the job.

[0] https://www.archlinux.org/pacman/alpm-hooks.5.html
eric wroteThe time tell us if a trouble can exist to parse some particular tmp/sys file. After a few weeks of use , pacopts, apparently, do the job.
Thanks eric! Your explanation cleared it up for me :) Marking the thread as solved.
P.S I wasn't saying pacopts was bad. (it is great!) i was just expressing a concern for it.

Powered by Obarun