diff -Nru oss-compat-0.0.6ubuntu1/debian/changelog oss-compat-1/debian/changelog --- oss-compat-0.0.6ubuntu1/debian/changelog 2011-12-07 16:19:28.000000000 +0000 +++ oss-compat-1/debian/changelog 2012-01-16 23:53:26.000000000 +0000 @@ -1,8 +1,15 @@ -oss-compat (0.0.6ubuntu1) precise; urgency=low +oss-compat (1) unstable; urgency=low - * Mark oss-compat Multi-Arch: foreign. + * Switch to single-component versions. + * Declare the package is "Multi-Arch: foreign", thanks to Steve Langasek + for the hint! (Closes: #651335.) + * Make /etc/modprobe.d/oss-compat.conf a file, handling the various + upgrade cases, and only removing it on purge. (Closes: #649507.) + (LP: #340873) + * Add kmod as an alternative dependency to avoid preventing + module-init-tools' removal. - -- Steve Langasek Wed, 07 Dec 2011 08:19:27 -0800 + -- Stephen Kitt Sun, 15 Jan 2012 14:06:16 +0100 oss-compat (0.0.6) unstable; urgency=low diff -Nru oss-compat-0.0.6ubuntu1/debian/control oss-compat-1/debian/control --- oss-compat-0.0.6ubuntu1/debian/control 2011-12-07 16:19:12.000000000 +0000 +++ oss-compat-1/debian/control 2012-01-16 23:50:51.000000000 +0000 @@ -1,8 +1,7 @@ Source: oss-compat Section: sound Priority: extra -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Games Team +Maintainer: Debian Games Team Uploaders: Stephen Kitt Build-Depends: debhelper (>= 7) Standards-Version: 3.9.2 @@ -10,7 +9,7 @@ Package: oss-compat Architecture: all Multi-Arch: foreign -Depends: module-init-tools | hurd, ${misc:Depends} +Depends: kmod | module-init-tools | hurd, ${misc:Depends} Description: Open Sound System (OSS) compatibility package This package ensures that Open Sound System support is provided in some way. On Linux, it enables the ALSA compatibility modules. On diff -Nru oss-compat-0.0.6ubuntu1/debian/postinst oss-compat-1/debian/postinst --- oss-compat-0.0.6ubuntu1/debian/postinst 2011-12-06 21:16:24.000000000 +0000 +++ oss-compat-1/debian/postinst 2012-01-14 10:45:20.000000000 +0000 @@ -5,11 +5,33 @@ configure) case "`uname -s`" in Linux) - # Remove symlink on upgrades. Newer versions of module-init-tools - # require a .conf suffix. - [ -L /etc/modprobe.d/oss-compat ] && rm -f /etc/modprobe.d/oss-compat - - ln -sf /lib/oss-compat/linux /etc/modprobe.d/oss-compat.conf + # There are three points to consider when upgrading or installing: + # - current versions of module-init-tools require configuration + # files to have a .conf suffix; + # - policy requires changes to configuration to be preserved + # - policy forbids including configuration outside of /etc + curconffile=/etc/modprobe.d/oss-compat.conf + oldconffile=/etc/modprobe.d/oss-compat + if [ ! -f ${curconffile} -o -L ${curconffile} ]; then + if [ -L ${curconffile} ]; then + # Upgrading from previous testing/unstable version + curlinktgt=$(readlink -f ${curconffile}) + rm -f ${curconffile} + cp ${curlinktgt} ${curconffile} + elif [ -L ${oldconffile} ]; then + # Upgrading from stable, link + curlinktgt=$(readlink -f ${oldconffile}) + cp ${curlinktgt} ${curconffile} + elif [ -f ${oldconffile} ]; then + # Upgrading from stable, file + cp ${oldconffile} ${curconffile} + else + # Installing from scratch + cp /lib/oss-compat/linux ${curconffile} + fi + fi + # Cleanup stable configuration link + [ -L ${oldconffile} ] && rm -f ${oldconffile} if lsmod | grep -q "^snd " ; then modprobe snd || true diff -Nru oss-compat-0.0.6ubuntu1/debian/postrm oss-compat-1/debian/postrm --- oss-compat-0.0.6ubuntu1/debian/postrm 1970-01-01 00:00:00.000000000 +0000 +++ oss-compat-1/debian/postrm 2012-01-14 10:40:45.000000000 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +case "$1" in + purge) + rm -f /etc/modprobe.d/oss-compat.conf + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru oss-compat-0.0.6ubuntu1/debian/prerm oss-compat-1/debian/prerm --- oss-compat-0.0.6ubuntu1/debian/prerm 2011-12-06 21:16:24.000000000 +0000 +++ oss-compat-1/debian/prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/sh -set -e - -case "$1" in - remove) - rm -f /etc/modprobe.d/oss-compat.conf - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0