Author: fabbione Date: 2004-09-03 03:52:43 -0500 (Fri, 03 Sep 2004) New Revision: 1793
Modified: branches/debconf-overhaul/debian/xserver-xfree86.config.in Log: Enable v4l only if extmode is. Modified: branches/debconf-overhaul/debian/xserver-xfree86.config.in =================================================================== --- branches/debconf-overhaul/debian/xserver-xfree86.config.in 2004-09-02 06:43:51 UTC (rev 1792) +++ branches/debconf-overhaul/debian/xserver-xfree86.config.in 2004-09-03 08:52:43 UTC (rev 1793) @@ -1835,17 +1835,22 @@ # from a package version that didn't support it. if [ -n "$2" ] && dpkg --compare-versions "$2" lt "4.3.0.dfsg.1-7"; then db_get xserver-xfree86/config/modules - # Only add the module if it's not already there. - if ! expr "$RET" : ".*v4l.*" >/dev/null 2>&1; then - trace "upgrading from package version $2; adding v4l to list of selected" \ - "modules" - trace "old value of template \"xserver-xfree86/config/modules\": \"$RET\"" - # Add it to the end with a comma and space prepended if there are already - # some selected modules. Otherwise, make v4l the only selected module. - SELECTED_MODULES="${RET:+$RET, }v4l" - db_set xserver-xfree86/config/modules "$SELECTED_MODULES" - db_get xserver-xfree86/config/modules - trace "new value of template \"xserver-xfree86/config/modules\": \"$RET\"" + # Only add the module if it's not already there and extmod is loaded. + if expr "$RET" : ".*extmod.*" >/dev/null 2>&1; then + trace "extmod is enable: try to enable v4l if not already" + if ! expr "$RET" : ".*v4l.*" >/dev/null 2>&1; then + trace "upgrading from package version $2; adding v4l to list of selected" \ + "modules" + trace "old value of template \"xserver-xfree86/config/modules\": \"$RET\"" + # Add it to the end with a comma and space prepended if there are already + # some selected modules. Otherwise, make v4l the only selected module. + SELECTED_MODULES="${RET:+$RET, }v4l" + db_set xserver-xfree86/config/modules "$SELECTED_MODULES" + db_get xserver-xfree86/config/modules + trace "new value of template \"xserver-xfree86/config/modules\": \"$RET\"" + fi + else + trace "extmod is disable: do not attempt to enable v4l" fi fi