Add Pacman settings submenu with Color and ParallelDownloads#4404
Add Pacman settings submenu with Color and ParallelDownloads#4404Softer wants to merge 4 commits intoarchlinux:masterfrom
Conversation
Replace the standalone Parallel Downloads menu item with a Pacman submenu containing ParallelDownloads (default 5) and Color (default on). Settings are applied to both live and target system pacman.conf. Hidden behind --advanced flag. Backward compatible with old configs using "parallel_downloads" key.
|
I like the change but I still need to test and review it properly. |
I agree, but right now we have only two options in this menu, and both of them are advanced in my opinion. :) |
archinstall/lib/models/pacman.py
Outdated
| def default(cls) -> Self: | ||
| return cls() | ||
|
|
||
| def json(self) -> dict[str, Any]: |
There was a problem hiding this comment.
we shouldn't be using Any but rather a dedicated serialization type, see https://github.com/svartkanin/archinstall/blob/a48ecf044bcfc59da01c804ff683ebe0cd7a20ae/archinstall/lib/models/authentication.py?plain=1#L14
|
Yes I saw that, my question then is why is the color selection behind the advanced flag? |
I thought about this but wasn't sure what's better - I followed the same approach as the existing ParallelDownloads. What do you think? |
|
Keeping the parallel downloads behind the advanced is fine but i think the color can be enabled by default, therefore I'd suggest to make the pacman config menu entry enabled by default, show the color option and put the parallel downloads behind the advanced\ |
PR Description:
Replace the standalone "Parallel Downloads" menu item with a "Pacman" submenu (hidden behind the --advanced flag, same as before) containing two options:
ParallelDownloads is applied to the live system immediately for faster package installation. Both settings are written to the target system's /etc/pacman.conf by uncommenting and setting the corresponding lines.
Old config files using "parallel_downloads": N are still parsed correctly via a fallback in from_config().
Tests and Checks