66from archinstall .lib .authentication .authentication_menu import AuthenticationMenu
77from archinstall .lib .bootloader .bootloader_menu import BootloaderMenu
88from archinstall .lib .bootloader .utils import validate_bootloader_layout
9- from archinstall .lib .configuration import save_config
9+ from archinstall .lib .configuration import ConfigurationOutput , save_config
1010from archinstall .lib .disk .disk_menu import DiskLayoutConfigurationMenu
1111from archinstall .lib .general .general_menu import select_hostname , select_ntp , select_timezone
1212from archinstall .lib .general .system_menu import select_kernel , select_swap
@@ -498,70 +498,6 @@ def _validate_bootloader(self) -> str | None:
498498
499499 return None
500500
501- def _install_summary (self ) -> str :
502- """
503- Render a concise two-column summary of the current install configuration.
504-
505- The left column holds section labels, the right column holds values.
506- Column width adapts to the longest translated label so translations
507- do not break the alignment. Rows whose underlying config is not set
508- are skipped.
509-
510- Returns an empty string if nothing meaningful to show.
511- """
512- rows : list [tuple [str , str ]] = []
513-
514- disk_config : DiskLayoutConfiguration | None = self ._item_group .find_by_key ('disk_config' ).value
515- if disk_config and disk_config .device_modifications :
516- disk_parts : list [str ] = []
517- for mod in disk_config .device_modifications :
518- path = str (mod .device_path )
519- root_part = mod .get_root_partition ()
520- flags : list [str ] = []
521- if root_part and root_part .fs_type :
522- flags .append (root_part .fs_type .value )
523- if disk_config .disk_encryption :
524- flags .append (tr ('LUKS' ))
525- disk_parts .append (f'{ path } ({ " + " .join (flags )} )' if flags else path )
526- rows .append ((tr ('Disks' ), ', ' .join (disk_parts )))
527-
528- bl_config : BootloaderConfiguration | None = self ._item_group .find_by_key ('bootloader_config' ).value
529- if bl_config and bl_config .bootloader != Bootloader .NO_BOOTLOADER :
530- rows .append ((tr ('Bootloader' ), bl_config .bootloader .value ))
531-
532- kernels : list [str ] | None = self ._item_group .find_by_key ('kernels' ).value
533- if kernels :
534- rows .append ((tr ('Kernel' ), ', ' .join (kernels )))
535-
536- profile_config : ProfileConfiguration | None = self ._item_group .find_by_key ('profile_config' ).value
537- if profile_config and profile_config .profile :
538- names = profile_config .profile .current_selection_names ()
539- rows .append ((tr ('Profile' ), ', ' .join (names ) if names else profile_config .profile .name ))
540- if profile_config .greeter :
541- rows .append ((tr ('Greeter' ), profile_config .greeter .value ))
542-
543- packages : list [str ] | None = self ._item_group .find_by_key ('packages' ).value
544- if packages :
545- rows .append ((tr ('Packages' ), str (len (packages ))))
546-
547- net_config = self ._item_group .find_by_key ('network_config' ).value
548- if isinstance (net_config , NetworkConfiguration ):
549- rows .append ((tr ('Network' ), net_config .type .display_msg ()))
550-
551- locale_config : LocaleConfiguration | None = self ._item_group .find_by_key ('locale_config' ).value
552- if locale_config :
553- rows .append ((tr ('Locale' ), locale_config .sys_lang ))
554-
555- tz = self ._item_group .find_by_key ('timezone' ).value
556- if tz :
557- rows .append ((tr ('Timezone' ), tz ))
558-
559- if not rows :
560- return ''
561-
562- label_width = max (len (label ) for label , _ in rows ) + 2
563- return '\n ' .join (f'{ label :<{label_width }} { value } ' for label , value in rows )
564-
565501 def _prev_install_invalid_config (self , item : MenuItem ) -> str | None :
566502 if missing := self ._missing_configs ():
567503 text = tr ('Missing configurations:\n ' )
@@ -572,7 +508,8 @@ def _prev_install_invalid_config(self, item: MenuItem) -> str | None:
572508 if error := self ._validate_bootloader ():
573509 return tr (f'Invalid configuration: { error } ' )
574510
575- summary = self ._install_summary ()
511+ self .sync_all_to_config ()
512+ summary = ConfigurationOutput (self ._arch_config ).as_summary ()
576513 if summary :
577514 return f'{ tr ("Ready to install" )} \n \n { summary } '
578515 return tr ('Ready to install' )
0 commit comments