[Pkg-alsa-devel] [Debian ALSA CVS] debian/alsa-utils/debian/patches (1 file)
Thomas Hood
jdthood-guest@haydn.debian.org
Tue, 07 Sep 2004 00:49:04 -0600
Date: Tuesday, September 7, 2004 @ 00:49:04
Author: jdthood-guest
Path: /cvsroot/pkg-alsa/debian/alsa-utils/debian/patches
Modified: 90_debian_alsaconf_notouch.dpatch
Rework 90_debian_alsaconf_notouch to make it more obviously correct
-----------------------------------+
90_debian_alsaconf_notouch.dpatch | 38 ++++++++++--------------------------
1 files changed, 11 insertions(+), 27 deletions(-)
Index: debian/alsa-utils/debian/patches/90_debian_alsaconf_notouch.dpatch
diff -u debian/alsa-utils/debian/patches/90_debian_alsaconf_notouch.dpatch:1.1 debian/alsa-utils/debian/patches/90_debian_alsaconf_notouch.dpatch:1.2
--- debian/alsa-utils/debian/patches/90_debian_alsaconf_notouch.dpatch:1.1 Mon Sep 6 15:50:15 2004
+++ debian/alsa-utils/debian/patches/90_debian_alsaconf_notouch.dpatch Tue Sep 7 00:49:03 2004
@@ -24,9 +24,9 @@
@DPATCH@
diff -urNad /home/jdthood/src/pkg-alsa/debian/alsa-utils/alsaconf/alsaconf.in alsa-utils/alsaconf/alsaconf.in
---- /home/jdthood/src/pkg-alsa/debian/alsa-utils/alsaconf/alsaconf.in 2004-09-06 22:54:50.000000000 +0200
-+++ alsa-utils/alsaconf/alsaconf.in 2004-09-06 23:01:48.000000000 +0200
-@@ -166,9 +166,6 @@
+--- /home/jdthood/src/pkg-alsa/debian/alsa-utils/alsaconf/alsaconf.in 2004-09-07 08:46:29.000000000 +0200
++++ alsa-utils/alsaconf/alsaconf.in 2004-09-07 08:47:13.000000000 +0200
+@@ -154,9 +154,6 @@
if [ -d /etc/modprobe.d ]; then
cfgout="/etc/modprobe.d/sound"
fi
@@ -35,8 +35,8 @@
- fi
cfgfile="/etc/modprobe.conf"
elif [ "$distribution" = "debian" ]; then
- cfgfile="/etc/alsa/modutils/0.9"
-@@ -548,20 +545,6 @@
+ cfgfile="/etc/modutils/alsa-base"
+@@ -536,20 +533,6 @@
}
#
@@ -57,49 +57,41 @@
# configure and try test sound
#
ac_config_card () {
-@@ -595,17 +578,26 @@
+@@ -582,16 +565,17 @@
+ SOUND_CORE="snd"
fi
- if [ "$distribution" = "redhat" -o "$distribution" = "fedora" ] ; then
+- if [ "$distribution" = "redhat" -o "$distribution" = "fedora" ] ; then
- remove_ac_block < $cfgfile | remove_sndconfig_block | uniq > $TMP
-+ if [ -r $cfgfile ] ; then
-+ remove_ac_block < $cfgfile | remove_sndconfig_block | uniq > $TMP
-+ else
-+ rm -f $TMP
-+ fi
- else
+- else
- remove_ac_block < $cfgfile | remove_y2_block | uniq > $TMP
-+ if [ -r $cfgfile ] ; then
++ if [ -r $cfgfile ] ; then
++ if [ "$distribution" = "redhat" -o "$distribution" = "fedora" ] ; then
++ remove_ac_block < $cfgfile | remove_sndconfig_block | uniq > $TMP
++ else
+ remove_ac_block < $cfgfile | remove_y2_block | uniq > $TMP
-+ else
-+ rm -f $TMP
+ fi
fi
if [ -n "$cfgout" ]; then
- rm -f "$cfgout"
+- rm -f "$cfgout"
- touch "$cfgout"
-+ : > "$cfgout"
addcfg="$cfgout"
++ : > "$addcfg"
else
addcfg="$TMP"
-+ touch "$TMP"
echo "$ACB
- # --- ALSACONF verion $version ---" >> $addcfg
- fi
-@@ -637,10 +629,12 @@
- " >> $addcfg
+@@ -626,9 +610,11 @@
fi
-- if [ -n "$cfgout" ]; then
+ if [ -n "$cfgout" ]; then
- backup_old_config $cfgfile $TMP
-+ if [ -r $TMP ]; then
-+ if [ ! -r $cfgfile ] || ! cmp -s $TMP $cfgfile ; then
-+ cp -f $TMP $cfgfile
-+ fi
++ [ ! -r "$cfgfile" ] || cmp -s "$TMP" "$cfgfile" || cat "$TMP" > "$cfgfile"
++ rm -f "$TMP"
else
- backup_old_config $cfgfile $addcfg
-+ [ -r $cfgfile ] && : > $cfgfile
++ cmp -s "$addcfg" "$cfgfile" || cat "$addcfg" > "$cfgfile"
++ rm -f "$addcfg"
fi
/sbin/depmod -a 2>/dev/null