summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS11
-rw-r--r--perl-install/harddrake/sound.pm18
2 files changed, 25 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index ce4805f65..d842dad13 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,11 @@
-- draksound: Remove the "Enable 5.1..." option. This is now done via card profiles
- in native GUIs for GNOME and KDE (or pavucontrol)
-- draksound: Remove the "Enable user switching..." option as it relies on HAL
+- draksound
+ o Robustify the PulseAudio configs (don't try and write files if they
+ do not exists. Doing so previously would result in blank files that then
+ causes problems when installing PulseAudio as the "config" files are not
+ overwritten properly which can result in broken PA startup)
+ o Remove the "Enable 5.1..." option. This is now done via card profiles
+ in native GUIs for GNOME and KDE (or pavucontrol)
+ o Remove the "Enable user switching..." option as it relies on HAL
which is deprecated.
- Change scannerdrake to use skanlite instead of kooka
- any.pm: s!/usr/share/mdk/faces/!/usr/share/mga/faces/! should fix (mga#1315)
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index d06dd708d..8b6efeb5c 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -190,6 +190,10 @@ sub set_pulseaudio {
my ($val) = @_;
my $alterative = '/etc/sound/profiles/' . ($val ? 'pulse' : 'alsa');
+ if ( ! -d $alterative ) {
+ return;
+ }
+
common::symlinkf_update_alternatives('soundprofile', $alterative);
# (cg) This config file will eventually be dropped, but it is still needed for now
@@ -216,6 +220,11 @@ sub is_pulseaudio_glitchfree_enabled() {
sub set_pulseaudio_glitchfree {
my ($val) = @_;
+
+ if ( ! -f $pa_defaultsconfig_file ) {
+ return;
+ }
+
substInFile {
if ($val) {
s/^(load-module\s+module-(udev|hal)-detect)\s+tsched=0/$1/;
@@ -229,6 +238,11 @@ my $pa_client_conffile = "$::prefix/etc/pulse/client.conf";
sub set_PA_autospan {
my ($val) = @_;
+
+ if ( ! -f $pa_client_conffile ) {
+ return;
+ }
+
$val = 'autospawn = ' . bool2yesno($val) . "\n";
my $done;
substInFile {
@@ -298,6 +312,7 @@ sub switch {
push @alternative, $driver;
my %des = modules::category2modules_and_description('multimedia/sound');
+ my $is_pulseaudio_installed = ( -f $pa_defaultsconfig_file && -f $pa_client_conffile && -d '/etc/sound/profiles/pulse' );
my $is_pulseaudio_enabled = is_pulseaudio_enabled();
my $is_pulseaudio_glitchfree_enabled = is_pulseaudio_glitchfree_enabled();
@@ -323,11 +338,12 @@ sub switch {
{
text => N("Enable PulseAudio"),
type => 'bool', val => \$is_pulseaudio_enabled,
+ disabled => sub { !$is_pulseaudio_installed },
},
{
text => N("Use Glitch-Free mode"),
type => 'bool', val => \$is_pulseaudio_glitchfree_enabled,
- disabled => sub { !$is_pulseaudio_enabled },
+ disabled => sub { !$is_pulseaudio_installed || !$is_pulseaudio_enabled },
},
{
advanced => 1,