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
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


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.


this way you got your default options, but the user can overwrite them

Additional info:
mkinitcpio 29

Steps to reproduce:
Add in mkinitcpio.conf
and enable zstd
you will still use all cores and compression level -19
This task depends upon

Closed by  Doug Newgard (Scimmia)
Sunday, 20 December 2020, 14:30 GMT
Reason for closing:  Upstream
Comment by Thomas Schneider (BlackLotus) - Saturday, 19 December 2020, 21:13 GMT
Oh and this "patch" I propose doesn't even solve most of the problems this "default setting" brings.
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.
Comment by Michel Koss (MichelKoss1) - Sunday, 20 December 2020, 14:11 GMT