FS#55870 - [mkinitcpio] Fails to write modules in MODULES array to /config

Attached to Project: Arch Linux
Opened by Marc Burns (m4burns) - Wednesday, 04 October 2017, 20:33 GMT
Last edited by Dave Reisner (falconindy) - Friday, 06 October 2017, 19:30 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This bug was introduced in mkinitcpio commit

c5ad00c2 : arrayize config vars in mkinitcpio.conf

which removes the line

read -ra modules <<<"${MODULES//-/_}"

from parse_config().

The next line, which was not changed in c5ad00c2, reads the lowercase 'modules' variable. After the above line is removed, 'modules' is always empty. Thus, MODULES is never added to /config.

Attached is a patch to fix the issue.
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 06 October 2017, 19:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  mkinitcpio 24-2
Comment by Dave Reisner (falconindy) - Friday, 06 October 2017, 19:06 GMT
Thanks for the report. Your patch isn't actually a fully correct fix, though, because it assumes that every mkinitcpio.conf has been converted to arrays. If it hasn't, mkinitcpio will attempt to add the entire string (e.g. "foo bar" instead of "foo" and "bar") which will certainly fail to add anything.
Comment by Dave Reisner (falconindy) - Friday, 06 October 2017, 19:19 GMT Comment by Marc Burns (m4burns) - Friday, 06 October 2017, 19:26 GMT
Awesome! Thank you

Loading...