* Fix examples/config-sample.json to match the current config format
The sample config has not been valid since the 2023 disk layout rework
and currently fails to parse, so the file the README points users at
cannot be used:
- sector_size was null, but SectorSize became a required object
- partitions were missing the dev_path key, which the parser reads
- the /home size used the Percent unit, which no longer exists
- /home started at 20 GiB while / ended at 20993 MiB, overlapping it
- gfx_driver kept the old "All open-source (default)" value
Sizes and keys now mirror what the installer itself writes when saving
a configuration.
* Cover the example configs with a parsing test
Nothing in the test suite or CI reads examples/, which is how the sample
config could stay broken for years while every other config surface kept
working. Parse both example files through ArchConfigHandler, and check
the partition entries directly since the parser only reaches them when
the configured device exists on the machine, which is never true in CI.
* Fail the partition test when the example config has none
The loops in test_example_config_partitions would not execute if
device_modifications or a device's partitions were empty, so the test
could pass while checking nothing.
* Add tests for SSIDs with space
* Fix WiFi scan drop for spaced SSIDs
The wpa_cli scan_results puts the SSID last, splitting on all whitespace dropped
any network whose name contained spaces.
Reuse the existing 'Detect other operating systems' msgid so the
preview matches the menu item label and stays localizable, like the
neighbouring Removable and Plymouth labels. Suggested in PR review.
The os-prober block straps packages and edits /etc/default/grub without
leaving any trace in the install log. Add a debug marker, matching the
logging convention of the surrounding bootloader steps.
Since version 1.77 os-prober probes unmounted partitions exclusively
through grub-mount and silently skips them when it cannot run. The grub
package ships grub-mount but only lists fuse3 as an optional
dependency, so without it os-prober is limited to already-mounted
partitions and misses the common dual-boot case of Windows living on
another disk. Installing fuse3 also lets grub-mount read NTFS in
userspace, keeping detection independent of kernel filesystem modules
inside the installation chroot.
Expose the os_prober option in the bootloader submenu. The item is only
enabled when GRUB is selected and is reset when switching to a
bootloader without os-prober support, mirroring the uki and removable
handling. Regenerate the translation template for the new strings.
When the os_prober option is set, install the os-prober package and set
GRUB_DISABLE_OS_PROBER=false in /etc/default/grub so that grub-mkconfig
detects other operating systems such as Windows. The edit runs for both
the UKI and non-UKI paths and handles configs where the option is
commented out, set to another value or missing entirely.
Like the uki and removable options, an unsupported combination is
downgraded with a warning instead of failing the installation.
Introduce an os_prober flag on BootloaderConfiguration, defaulting to
false to match the upstream GRUB default of shipping os-prober
disabled. Bootloader.has_os_prober_support() limits the option to GRUB,
the only supported bootloader that consumes os-prober output.
Addresses the following:
pyright
```
archinstall/lib/models/device.py:759:11 - error: Type "Literal[PartitionType.PRIMARY]" is not assignable to return type "Self@PartitionType"
Type "Literal[PartitionType.PRIMARY]" is not assignable to type "Self@PartitionType" (reportReturnType)
archinstall/lib/models/device.py:762:11 - error: Type "Literal[PartitionType._UNKNOWN]" is not assignable to return type "Self@PartitionType"
Type "Literal[PartitionType._UNKNOWN]" is not assignable to type "Self@PartitionType" (reportReturnType)
```
pyrefly
```
ERROR Returned type `Literal[PartitionType.PRIMARY]` is not assignable to declared return type `Self@PartitionType` [bad-return]
--> archinstall/lib/models/device.py:759:11
|
757 | def get_type_from_code(cls, code: int) -> Self:
| ---- declared return type
758 | if code == parted.PARTITION_NORMAL:
759 | return cls.PRIMARY
| ^^^^^^^^^^^
|
ERROR Returned type `Literal[PartitionType._UNKNOWN]` is not assignable to declared return type `Self@PartitionType` [bad-return]
--> archinstall/lib/models/device.py:762:11
|
757 | def get_type_from_code(cls, code: int) -> Self:
| ---- declared return type
758 | if code == parted.PARTITION_NORMAL:
759 | return cls.PRIMARY
760 | else:
761 | debug(f'Partition code not supported: {code}')
762 | return cls._UNKNOWN
| ^^^^^^^^^^^^
|
```
ty
```
error[invalid-return-type]: Return type does not match returned value
--> archinstall/lib/models/device.py:757:44
|
757 | def get_type_from_code(cls, code: int) -> Self:
| ---- Expected `Self@get_type_from_code` because of return type
758 | if code == parted.PARTITION_NORMAL:
759 | return cls.PRIMARY
| ^^^^^^^^^^^ expected `Self@get_type_from_code`, found `Literal[PartitionType.PRIMARY]`
|
error[invalid-return-type]: Return type does not match returned value
--> archinstall/lib/models/device.py:757:44
|
757 | def get_type_from_code(cls, code: int) -> Self:
| ---- Expected `Self@get_type_from_code` because of return type
758 | if code == parted.PARTITION_NORMAL:
759 | return cls.PRIMARY
760 | else:
761 | debug(f'Partition code not supported: {code}')
762 | return cls._UNKNOWN
| ^^^^^^^^^^^^ expected `Self@get_type_from_code`, found `Literal[PartitionType._UNKNOWN]`
|
```
Addresses the following:
pyright
```
archinstall/lib/models/device.py:262:10 - error: Type "Literal[PartitionTable.GPT, PartitionTable.MBR]" is not assignable to return type "Self@PartitionTable"
Type "Literal[PartitionTable.GPT, PartitionTable.MBR]" is not assignable to type "Self@PartitionTable" (reportReturnType)
```
ty
```
error[invalid-return-type]: Return type does not match returned value
--> archinstall/lib/models/device.py:261:22
|
261 | def default(cls) -> Self:
| ---- Expected `Self@default` because of return type
262 | return cls.GPT if SysInfo.has_uefi() else cls.MBR
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self@default`, found `PartitionTable`
|
```
Addresses the following:
pyright
```
archinstall/lib/hardware.py:25:11 - error: Type "Literal[CpuVendor._Unknown]" is not assignable to return type "Self@CpuVendor"
Type "Literal[CpuVendor._Unknown]" is not assignable to type "Self@CpuVendor" (reportReturnType)
```
pyrefly
```
ERROR Returned type `Literal[CpuVendor._Unknown]` is not assignable to declared return type `Self@CpuVendor` [bad-return]
--> archinstall/lib/hardware.py:25:11
|
20 | def get_vendor(cls, name: str) -> Self:
| ---- declared return type
21 | if vendor := getattr(cls, name, None):
22 | return vendor
23 | else:
24 | debug(f"Unknown CPU vendor '{name}' detected.")
25 | return cls._Unknown
| ^^^^^^^^^^^^
|
```
ty
```
error[invalid-return-type]: Return type does not match returned value
--> archinstall/lib/hardware.py:20:36
|
20 | def get_vendor(cls, name: str) -> Self:
| ---- Expected `Self@get_vendor` because of return type
21 | if vendor := getattr(cls, name, None):
22 | return vendor
23 | else:
24 | debug(f"Unknown CPU vendor '{name}' detected.")
25 | return cls._Unknown
| ^^^^^^^^^^^^ expected `Self@get_vendor`, found `Literal[CpuVendor._Unknown]`
|
```
Addresses the following:
pyright
```
archinstall/lib/models/bootloader.py:42:11 - error: Type "Literal[Bootloader.NO_BOOTLOADER]" is not assignable to return type "Self@Bootloader"
Type "Literal[Bootloader.NO_BOOTLOADER]" is not assignable to type "Self@Bootloader" (reportReturnType)
archinstall/lib/models/bootloader.py:44:11 - error: Type "Literal[Bootloader.Systemd]" is not assignable to return type "Self@Bootloader"
Type "Literal[Bootloader.Systemd]" is not assignable to type "Self@Bootloader" (reportReturnType)
archinstall/lib/models/bootloader.py:46:11 - error: Type "Literal[Bootloader.Grub]" is not assignable to return type "Self@Bootloader"
Type "Literal[Bootloader.Grub]" is not assignable to type "Self@Bootloader" (reportReturnType)
```
pyrefly
```
ERROR Returned type `Literal[Bootloader.NO_BOOTLOADER]` is not assignable to declared return type `Self@Bootloader` [bad-return]
--> archinstall/lib/models/bootloader.py:42:11
|
40 | def get_default(cls, uefi: bool, skip_boot: bool = False) -> Self:
| ---- declared return type
41 | if skip_boot:
42 | return cls.NO_BOOTLOADER
| ^^^^^^^^^^^^^^^^^
|
ERROR Returned type `Literal[Bootloader.Systemd]` is not assignable to declared return type `Self@Bootloader` [bad-return]
--> archinstall/lib/models/bootloader.py:44:11
|
40 | def get_default(cls, uefi: bool, skip_boot: bool = False) -> Self:
| ---- declared return type
41 | if skip_boot:
42 | return cls.NO_BOOTLOADER
43 | elif uefi:
44 | return cls.Systemd
| ^^^^^^^^^^^
|
ERROR Returned type `Literal[Bootloader.Grub]` is not assignable to declared return type `Self@Bootloader`
[bad-return]
--> archinstall/lib/models/bootloader.py:46:11
|
40 | def get_default(cls, uefi: bool, skip_boot: bool = False) -> Self:
| ---- declared return type
41 | if skip_boot:
42 | return cls.NO_BOOTLOADER
43 | elif uefi:
44 | return cls.Systemd
45 | else:
46 | return cls.Grub
| ^^^^^^^^
|
```
ty
```
error[invalid-return-type]: Return type does not match returned value
--> archinstall/lib/models/bootloader.py:40:63
|
40 | def get_default(cls, uefi: bool, skip_boot: bool = False) -> Self:
| ---- Expected `Self@get_default` because of return type
41 | if skip_boot:
42 | return cls.NO_BOOTLOADER
| ^^^^^^^^^^^^^^^^^ expected `Self@get_default`, found `Literal[Bootloader.NO_BOOTLOADER]`
|
error[invalid-return-type]: Return type does not match returned value
--> archinstall/lib/models/bootloader.py:40:63
|
40 | def get_default(cls, uefi: bool, skip_boot: bool = False) -> Self:
| ---- Expected `Self@get_default` because of return type
41 | if skip_boot:
42 | return cls.NO_BOOTLOADER
43 | elif uefi:
44 | return cls.Systemd
| ^^^^^^^^^^^ expected `Self@get_default`, found `Literal[Bootloader.Systemd]`
|
error[invalid-return-type]: Return type does not match returned value
--> archinstall/lib/models/bootloader.py:46:11
|
46 | return cls.Grub
| ^^^^^^^^ expected `Self@get_default`, found `Literal[Bootloader.Grub]`
|
::: archinstall/lib/models/bootloader.py:40:63
|
40 | def get_default(cls, uefi: bool, skip_boot: bool = False) -> Self:
| ---- Expected `Self@get_default` because of return type
|
```
* fix(applications): add ghostscript to print service packages
Selecting the print service installs cups, system-config-printer and
cups-pk-helper, but not ghostscript. cups relies on ghostscript for the
PDF/PostScript rendering filter, so driverless (IPP Everywhere) print
jobs fail out of the box with:
cfFilterGhostscript: Unable to launch Ghostscript: gs: No such file or directory
Add ghostscript to the package list and cover it with a regression test.
Closes#4595
* test: drop low-value print service package assertion
This will help catch incorrect translation placeholders, like those
fixed in commit dccd0c8cc.
This commit also removes custom checking code from the
locales_generator.sh script.
On aarch64 both the GRUB and Limine installers assume x86 and fail.
GRUB names its EFI target 'arm64', but platform.machine() returns
'aarch64', so passing --target=aarch64-efi is rejected. Map aarch64
to the arm64 target name expected by grub-install.
Limine ships architecture-specific default EFI binaries: BOOTAA64.EFI
on aarch64 versus BOOTIA32.EFI and BOOTX64.EFI on x86. Select the
correct binaries in the three places that reference them: when copying
them into the ESP, when building the pacman hook that refreshes them on
update, and when choosing the 64-bit EFI boot menu loader path.
Co-authored-by: Steev Klimaszewski <steev@parrotsec.org>