pmbootstrap-meow/pmb/install
Clayton Craft 8abd698cab pmb.install: fall back to a valid hostname if none set (MR 2260)
If the device name does not make a valid hostname, fall back to some
simple valid hostname. Some device names (e.g. 'generic-x86_64') are
valid names for apk packages and such, but are not valid host names. It
assumes that the user (real, or CI) doesn't care if it's unset and just
expects pmb to work and not conditionally crash based on the device they
selected.

Situations where the user sets an invalid hostname are still validated
separately and cause an exception so that they know their config was
wrong and to fit it.

This fixes an issue that came up in CI when doing `pmb config device
generic-x86_64` followed by `pmb install`.

I considered trying to convert invalid host names into valid ones, but I
didn't feel like it was worth the trouble of adding stuff to convert and
re-validate when we can just set a static, boring, but definitely valid
default if the device name is not valid.
2024-02-16 18:57:49 +00:00
..
__init__.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
_install.py pmb.install: fall back to a valid hostname if none set (MR 2260) 2024-02-16 18:57:49 +00:00
blockdevice.py install: rename --sdcard arg to --disk 2023-11-19 20:27:37 +01:00
format.py install: more comprehensive subdivision of btrfs subvols (MR 2233) 2024-02-06 12:04:20 +00:00
losetup.py Bump copyright to 2023 2023-01-22 19:18:06 +01:00
partition.py install: rename --sdcard arg to --disk 2023-11-19 20:27:37 +01:00
recovery.py treewide: rename _system to _rootfs in various places 2023-06-12 08:46:22 +02:00
ui.py pmb.install: support pmb_recommends for any package 2024-01-09 16:55:47 +01:00