Author: branden Date: 2003-08-27 02:53:29 -0500 (Wed, 27 Aug 2003) New Revision: 444
Modified: trunk/debian/changelog trunk/debian/xserver-common.preinst.in trunk/debian/xserver-xfree86.preinst.in Log: * debian/xserver-{common,xfree86}.preinst.in: if installing (not upgrading) the package, place the non-conffile configuration files under automatic management, but only if they do not already exist (Closes: #207268) Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2003-08-27 07:31:58 UTC (rev 443) +++ trunk/debian/changelog 2003-08-27 07:53:29 UTC (rev 444) @@ -27,6 +27,9 @@ is not a directory; assume local admin cleverness - don't migrate a configuration file if its debconf region markers have been removed + - if installing (not upgrading) the package, place the non-conffile + configuration files under automatic management, but only if they do not + already exist (Closes: #207268) * debian/rules: stop calling debconf2po-update, per Denis Barbier (Closes: #172579) @@ -55,7 +58,7 @@ * debian/po/fr.po: updated French translations (thanks, Christian Perrier) (Closes: #207239) - -- Branden Robinson <[EMAIL PROTECTED]> Wed, 27 Aug 2003 02:30:54 -0500 + -- Branden Robinson <[EMAIL PROTECTED]> Wed, 27 Aug 2003 02:50:39 -0500 xfree86 (4.2.1-10) unstable; urgency=medium Modified: trunk/debian/xserver-common.preinst.in =================================================================== --- trunk/debian/xserver-common.preinst.in 2003-08-27 07:31:58 UTC (rev 443) +++ trunk/debian/xserver-common.preinst.in 2003-08-27 07:53:29 UTC (rev 444) @@ -41,9 +41,23 @@ mkdir --mode=755 --parents "$CONFIG_AUX_DIR" fi - # if upgrading from < 4.2.1-10, migrate X wrapper config file to (simplified) - # ucf-style handling - if dpkg --compare-versions "$2" lt-nl "4.2.1-10"; then + # implement (simplified) ucf-style configration file handling + + # if performing a fresh install, place config files under management if they + # do *not* already exist + if [ "$1" = "install" ]; then + if [ ! -e "$XWRAPPER_CONFIG" ]; then + # only proceed if config file auxiliary directory exists + if [ -d "$CONFIG_AUX_DIR" ]; then + # cheap, fork()-free version of "touch" + : > "$XWRAPPER_CONFIG" + md5sum "$XWRAPPER_CONFIG" > "$XWRAPPER_CONFIG_CHECKSUM" + fi + fi + fi + + # if upgrading from < 4.2.1-10, migrate X wrapper config file + if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "4.2.1-10"; then # do we have a configuration file to work with? if [ -e "$XWRAPPER_CONFIG" ]; then # only proceed if config file auxiliary directory exists @@ -74,11 +88,11 @@ fi fi fi + # in other news, unregister the now no-longer-used templates + db_unregister xserver-common/manage_config_with_debconf + db_unregister xserver-common/move_existing_nondebconf_config fi - # in other news, unregister the now no-longer-used templates - db_unregister xserver-common/manage_config_with_debconf - db_unregister xserver-common/move_existing_nondebconf_config fi fi Modified: trunk/debian/xserver-xfree86.preinst.in =================================================================== --- trunk/debian/xserver-xfree86.preinst.in 2003-08-27 07:31:58 UTC (rev 443) +++ trunk/debian/xserver-xfree86.preinst.in 2003-08-27 07:53:29 UTC (rev 444) @@ -29,9 +29,31 @@ mkdir --mode=755 --parents "$CONFIG_AUX_DIR" fi - # if upgrading from < 4.2.1-10, migrate X server symlink and XF86Config-4 - # to (simplified) ucf-style handling - if dpkg --compare-versions "$2" lt-nl "4.2.1-10"; then + # implement (simplified) ucf-style configration file handling + + # if performing a fresh install, place config files under management if they + # do *not* already exist + if [ "$1" = "install" ]; then + # only proceed if config file auxiliary directory exists + if [ -d "$CONFIG_AUX_DIR" ]; then + # first, create and checksum the X server symlink + if [ ! -e "$SERVER_SYMLINK" ]; then + # $THIS_SERVER is just a default; could as easily be /bin/true + ln -s "$THIS_SERVER" "$SERVER_SYMLINK" + readlink "$SERVER_SYMLINK" | md5sum > "$SERVER_SYMLINK_CHECKSUM" + fi + # next, XF86Config-4 + if [ ! -e "$XF86CONFIG" ]; then + # cheap, fork()-free version of "touch" + : > "$XF86CONFIG" + md5sum "$XF86CONFIG" > "$XF86CONFIG_CHECKSUM" + fi + fi + fi + + # if performing a fresh install, place config files under management if they + # do *not* already exist + if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "4.2.1-10"; then # do we have any configuration files to work with? if [ -e "$SERVER_SYMLINK" -o -e "$XF86CONFIG" ]; then # only proceed if config file auxiliary directory exists