FS#69036 - [mkinitcpio] COMPRESSION_OPTIONS automatically appended
Attached to Project:
Arch Linux
Opened by Thomas Schneider (BlackLotus) - Saturday, 19 December 2020, 20:58 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 20 December 2020, 14:30 GMT
Opened by Thomas Schneider (BlackLotus) - Saturday, 19 December 2020, 20:58 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 20 December 2020, 14:30 GMT
|
Details
Description:
xz) COMPRESSION_OPTIONS+=('--check=crc32') ;; lz4) COMPRESSION_OPTIONS+=('-l') ;; zstd) COMPRESSION_OPTIONS+=('-19' '-T0') ;; mkinitcpio appends those config options. zstd for instance uses the last options given so mkinitcpio overwrites the config options the user specified! You should append the user options instead i.e. > COMPRESSION_OPTIONS=('-19' '-T0' ${COMPRESSION_OPTIONS[*]}) this way you got your default options, but the user can overwrite them Additional info: mkinitcpio 29 Steps to reproduce: Add in mkinitcpio.conf COMPRESSION_OPTIONS=(-1 -T1) and enable zstd you will still use all cores and compression level -19 |
This task depends upon
For instance I would bet that some people want zstd just to compress it as fast as possible and want to try something like --adapt, but adapt is ignored when a compression level is specified.
I know that for most users -19 -T0 are sane defaults because it should take only a few seconds and compress the best and should be fast, but for thos with weak PCs it can be the difference of generating an image in 1minute or 10minutes (old atom boxes for instance).
Don't know what the best solution is, but I would call this a bug.
https://github.com/archlinux/mkinitcpio/issues/40
https://github.com/archlinux/mkinitcpio/pull/39