linux-tkg/linux54-tkg/linux54-tkg-config/90-cleanup.hook
Tk-Glitch f0f7c029f3 Add a simple post transaction hook to clean remnant dir/files
Since the move to the new hooking mechanisms, we got remnant files after package upgrade.
They aren't part of the package and get generated by the depmod hook.
This addresses the issue by checking for tkg kernels module dirs and removing the ones missing a vmlinuz file (which is part of the package).
Due to the way it works, it'll also get rid of all past remnants to stay transparent for users.
2020-05-01 00:22:00 +02:00

15 lines
259 B
Plaintext

[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/modules/*/
Target = !usr/lib/modules/*/?*
[Action]
Description = Cleaning up...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/cleanup
NeedsTargets