FS#64380 - [mkinitcpio] 27-1 /usr/share/mkinitcpio/hook.preset: It is a hook.preset.template.
Attached to Project:
Arch Linux
Opened by regid (regid1) - Monday, 04 November 2019, 00:38 GMT
Last edited by Giancarlo Razzolini (grazzolini) - Tuesday, 18 February 2020, 09:37 GMT
Opened by regid (regid1) - Monday, 04 November 2019, 00:38 GMT
Last edited by Giancarlo Razzolini (grazzolini) - Tuesday, 18 February 2020, 09:37 GMT
|
Details
Description: Descriptive names helps a lot.
/usr/share/mkinitcpio/hook.preset: Is a
hook.preset.template. It is not an acceptable preset.
Other then changing the file name, I hope the following is the only required modification: --- a/usr/share/libalpm/scripts/mkinitcpio-install 2019-10-29 14:01:14.000000000 +0000 +++ b/usr/share/libalpm/scripts/mkinitcpio-install 2019-11-04 00:28:35.905364148 +0000 @@ -18,11 +18,11 @@ while read -r line; do preset="/etc/mkinitcpio.d/${pkgbase}.preset" if [[ ! -e $preset ]]; then if [[ -e $preset.pacsave ]]; then - # move the pacsave to the template + # move the pacsave to the preset mv "${preset}.pacsave" "$preset" else # create the preset from the template - sed "s|%PKGBASE%|${pkgbase}|g" /usr/share/mkinitcpio/hook.preset \ + sed "s|%PKGBASE%|${pkgbase}|g" /usr/share/mkinitcpio/hook.preseti.template \ | install -Dm644 /dev/stdin "$preset" fi fi Additional info: * mkinitcpio 27-1 |
This task depends upon
Closed by Giancarlo Razzolini (grazzolini)
Tuesday, 18 February 2020, 09:37 GMT
Reason for closing: No response
Additional comments about closing: No response from the OP in a long time.
Tuesday, 18 February 2020, 09:37 GMT
Reason for closing: No response
Additional comments about closing: No response from the OP in a long time.
Perhaps this confusion stem from the place where this is installed? Right alongside a example.preset file? Also, if you want to argue that the hook.preset is not acceptable, you might also want to check the example.preset file. It literally saves the images to /tmp. How's that acceptable?
If you look at it from this angle, the hook.preset file might serve as an even better example than the example.preset bundled with mkinitcpio.
Having said all that, your patch has a typo. Can you also either send the patch to the [arch-projects] ML or (I personally prefer), open a PR on mknitcpio's github repository? We can move this discussion there if you want.