Open nintyfan opened 1 year ago
The netinstall module doesn't read from a file at that stage. It reads from global storage. So you would probably want to write the data to global storage instead of a file.
If you need an example of that, you can look at the packagechooser module.
Calamares modules read their configuration files at startup, so that's too late. Offering an entirely arbitrary package list at install time is tough -- every other module either has the full configuration on disk, or, like netinstall, has a mechanism for fetching the full configuration at runtime, but it's still the same kind of configuration.
I thought netinstall is a gui for package selection. Did you write about packages module. I maybe misunderstood.
pon., 28 sie 2023, 21:20 użytkownik Adriaan de Groot < @.***> napisał:
Calamares modules read their configuration files at startup, so that's too late. Offering an entirely arbitrary package list at install time is tough -- every other module either has the full configuration on disk, or, like netinstall, has a mechanism for fetching the full configuration at runtime, but it's still the same kind of configuration.
— Reply to this email directly, view it on GitHub https://github.com/calamares/calamares-extensions/issues/27#issuecomment-1696242635, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXA6QZA6LRRWWNB2GZZCXLXXTVOJANCNFSM6AAAAAA4BVB7AU . You are receiving this because you authored the thread.Message ID: @.***>
Calamares modules read their configuration files at startup, so that's too late. Offering an entirely arbitrary package list at install time is tough -- every other module either has the full configuration on disk, or, like netinstall, has a mechanism for fetching the full configuration at runtime, but it's still the same kind of configuration.
Ok. I uses google's translator. :-D How runtime configuration for netinstall works? Should I emit some signal to force reload configuration or call routine with String or c-string contains new configuration?
Ok. I uses google's translator. :-D How runtime configuration for netinstall works? Should I emit some signal to force reload configuration or call routine with String or c-string contains new configuration?
Netinstall reads from global storage when the module is executed. All you need to do is add your data to global storage in the correct key prior to the module executing.
If you need an example of how to do it, the packagechooser module has code that writes data for the netinstall module. Specifically, that code is here: https://github.com/calamares/calamares/blob/calamares/src/modules/packagechooser/Config.cpp#L149
Two weeks ago, dalto8 have merged my work to add flatpak as calamares package manager. But, there is need to download package list from flatphub, I think.
Module should work in this way: download package list by flapak (flatpak list) and them save it into yml file (not config file of netinstall module, but to file contains list of packages; file format is supported by netinstall to represent file was downloadable set of package names).
If distro vendor configure everything correctly, then:
Any suggestions? Saving list of packages on filesystem is simplest approach. I thought about making netinstall be able to read packages list from local storage of calamares, but it will be too hard.
Previous work: https://github.com/calamares/calamares/pull/2176