Based on the way kdumpst alpm hooks were coded, we have currently one hook per initrd system supported (mkinitcpio, mkinitcpio-git, dracut). When a kernel package is installed/upgraded/removed, all of them are triggered; but usually users only have one initrd system (enough headaches with just one, imagine having more heh). The net effect of this, due to the "verbiage" of alpm, is that harmless error messages were shown, like the following one: "error: unable to run hook 99-kdump-dracut.hook: could not satisfy dependencies" This one was quite common since the vast majority of Arch users rely on mkinitcpio. And this message would show at *every* kernel package operation, leading users to wonder what's wrong (may they pay attention to error messages, of course). In order to fix that, we hereby follow a great and simple suggestion from Antiz at #archlinux-projects/Libera (thanks!): let's use a shell call to encompass the tests for different initrd systems. With that, was easy also to remove the redundant mkinitcpio-git hook. No functional change should be expected from this change. Closes: #14 ("Minimal initramfs pacman hooks should not present error messages on different init systems") Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
19 lines
500 B
Plaintext
19 lines
500 B
Plaintext
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# Copyright (c) 2022 Valve.
|
|
# Maintainer: Guilherme G. Piccoli <gpiccoli@igalia.com>
|
|
#
|
|
# alpm hook to deal with the kdump initramfs creation/deletion
|
|
# for INITRD. This hook would act upon INITRD package installation.
|
|
#
|
|
[Trigger]
|
|
Type = Path
|
|
Operation = Install
|
|
Target = usr/bin/INITRD
|
|
|
|
[Action]
|
|
Description = Managing kdump minimal initramfs for INITRD installation
|
|
When = PostTransaction
|
|
Exec = /usr/lib/kdumpst/kdump-INITRD-hook.sh
|
|
NeedsTargets
|