Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/user_interaction.py2
-rw-r--r--examples/guided.py26
2 files changed, 18 insertions, 10 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index c5ff17ca..b94bf3f5 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -107,7 +107,7 @@ def ask_for_a_timezone():
def ask_for_audio_selection():
audio = "pulseaudio" # Default for most desktop environments
pipewire_choice = input("Would you like to install pipewire instead of pulseaudio as the default audio server? [Y/n] ").lower()
- if pipewire_choice == "y":
+ if pipewire_choice in ("y", ""):
audio = "pipewire"
return audio
diff --git a/examples/guided.py b/examples/guided.py
index 55855d1b..fa74fbba 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -182,9 +182,16 @@ def ask_user_questions():
)
exit(1)
- # Ask about audio server selection (this right now just asks for pipewire and defaults to pulseaudio otherwise)
+ # Ask about audio server selection if one is not already set
if not archinstall.arguments.get('audio', None):
- archinstall.arguments['audio'] = archinstall.ask_for_audio_selection()
+
+ # only ask for audio server selection on a desktop profile
+ if str(archinstall.arguments['profile']) == 'Profile(desktop)':
+ archinstall.arguments['audio'] = archinstall.ask_for_audio_selection()
+ else:
+ # packages installed by a profile may depend on audio and something may get installed anyways, not much we can do about that.
+ # we will not try to remove packages post-installation to not have audio, as that may cause multiple issues
+ archinstall.arguments['audio'] = 'none'
# Additional packages (with some light weight error handling for invalid package names)
if not archinstall.arguments.get('packages', None):
@@ -334,13 +341,14 @@ def perform_installation(device, boot_partition, language, mirrors):
installation.enable_service('systemd-networkd')
installation.enable_service('systemd-resolved')
- installation.log(f"The {archinstall.arguments.get('audio', None)} audio server will be used.", level=archinstall.LOG_LEVELS.Info)
- if archinstall.arguments.get('audio', None) == 'pipewire':
- print('Installing pipewire ...')
- installation.add_additional_packages(["pipewire", "pipewire-alsa", "pipewire-docs", "pipewire-jack", "pipewire-media-session", "pipewire-pulse", "gst-plugin-pipewire", "libpulse"])
- elif archinstall.arguments.get('audio', None) == 'pulseaudio':
- print('Installing pulseaudio ...')
- installation.add_additional_packages("pulseaudio")
+ if archinstall.arguments.get('audio', None) != None:
+ installation.log(f"The {archinstall.arguments.get('audio', None)} audio server will be used.", level=archinstall.LOG_LEVELS.Info)
+ if archinstall.arguments.get('audio', None) == 'pipewire':
+ print('Installing pipewire ...')
+ installation.add_additional_packages(["pipewire", "pipewire-alsa", "pipewire-docs", "pipewire-jack", "pipewire-media-session", "pipewire-pulse", "gst-plugin-pipewire", "libpulse"])
+ elif archinstall.arguments.get('audio', None) == 'pulseaudio':
+ print('Installing pulseaudio ...')
+ installation.add_additional_packages("pulseaudio")
if archinstall.arguments.get('packages', None) and archinstall.arguments.get('packages', None)[0] != '':
installation.add_additional_packages(archinstall.arguments.get('packages', None))