X Strike Force XFree86 SVN commit: r1254 - trunk/debian
Author: branden
Date: 2004-04-14 14:14:43 -0500 (Wed, 14 Apr 2004)
New Revision: 1254
Modified:
trunk/debian/changelog
trunk/debian/shell-lib.sh
trunk/debian/xdm.config.in
trunk/debian/xdm.postinst.in
trunk/debian/xdm.prerm.in
trunk/debian/xfree86-common.config.in
trunk/debian/xserver-common.config.in
trunk/debian/xserver-common.preinst.in
Log:
Rename shell-lib.sh's safe_debconf() function to run(); there's no reason
to imply it's useful only for debconf commands. Update all script
invocations of safe_debconf() to run().
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-04-14 18:25:27 UTC (rev 1253)
+++ trunk/debian/changelog 2004-04-14 19:14:43 UTC (rev 1254)
@@ -194,8 +194,12 @@
* Fix dexconf to not write an empty line to the end of generated
XF86Config{,-4} files.
- -- Branden Robinson <branden@debian.org> Wed, 14 Apr 2004 13:24:30 -0500
+ * Rename shell-lib.sh's safe_debconf() function to run(); there's no reason
+ to imply it's useful only for debconf commands. Update all script
+ invocations of safe_debconf() to run().
+ -- Branden Robinson <branden@debian.org> Wed, 14 Apr 2004 14:13:03 -0500
+
xfree86 (4.3.0-7) unstable; urgency=medium
* Urgency due to fix for FTBFS. Yes -- I too am begging for it to stop.
Modified: trunk/debian/shell-lib.sh
===================================================================
--- trunk/debian/shell-lib.sh 2004-04-14 18:25:27 UTC (rev 1253)
+++ trunk/debian/shell-lib.sh 2004-04-14 19:14:43 UTC (rev 1254)
@@ -501,11 +501,12 @@
fi
}
-safe_debconf () {
- # syntax: safe_debconf debconf_command [ debconf_argument ... ]
+run () {
+ # syntax: run command [ argument ... ]
#
- # Run specified debconf command with (optional) specified arguments, guarding
- # ourselves against abnormal exits.
+ # Run specified command with optional arguments and report its exit status.
+ # Useful for commands whose exit status may be nonzero, but still acceptable,
+ # or commands whose failure is not fatal to us.
#
# NOTE: Do *not* use this function with db_get or db_metaget commands; in
# those cases the return value of the debconf command *must* be checked
@@ -515,8 +516,8 @@
# validate arguments
if [ $# -lt 1 ]; then
- usage_error "safe_debconf() called with wrong number of arguments;" \
- "expected at least 1, got $#"
+ usage_error "run() called with wrong number of arguments; expected at" \
+ "least 1, got $#"
exit $SHELL_LIB_USAGE_ERROR
fi
Modified: trunk/debian/xdm.config.in
===================================================================
--- trunk/debian/xdm.config.in 2004-04-14 18:25:27 UTC (rev 1253)
+++ trunk/debian/xdm.config.in 2004-04-14 19:14:43 UTC (rev 1254)
@@ -31,8 +31,8 @@
if [ "$OWNERS" != "$CHOICES" ]; then
observe "X display managers now available are \"$OWNERS\""
- safe_debconf db_subst shared/default-x-display-manager choices "$OWNERS"
- safe_debconf db_fset shared/default-x-display-manager seen false
+ run db_subst shared/default-x-display-manager choices "$OWNERS"
+ run db_fset shared/default-x-display-manager seen false
fi
# debconf is not a registry; use the current contents of the default display
@@ -47,7 +47,7 @@
"$DEFAULT_DISPLAY_MANAGER_FILE does not exist or is not" \
"executable"
fi
- safe_debconf db_set shared/default-x-display-manager "$CURRENT_DEFAULT"
+ run db_set shared/default-x-display-manager "$CURRENT_DEFAULT"
fi
else
CURRENT_DEFAULT=
@@ -56,8 +56,8 @@
fi
fi
-safe_debconf db_input high shared/default-x-display-manager
-safe_debconf db_go
+run db_input high shared/default-x-display-manager
+run db_go
# using this display manager?
NEW_DEFAULT=
Modified: trunk/debian/xdm.postinst.in
===================================================================
--- trunk/debian/xdm.postinst.in 2004-04-14 18:25:27 UTC (rev 1253)
+++ trunk/debian/xdm.postinst.in 2004-04-14 19:14:43 UTC (rev 1254)
@@ -66,7 +66,7 @@
fi
# restarting the daemon may cause output to stdout
-safe_debconf db_stop
+run db_stop
# don't start xdm if we are upgrading without stopping it
NOSTART=
Modified: trunk/debian/xdm.prerm.in
===================================================================
--- trunk/debian/xdm.prerm.in 2004-04-14 18:25:27 UTC (rev 1253)
+++ trunk/debian/xdm.prerm.in 2004-04-14 19:14:43 UTC (rev 1254)
@@ -54,8 +54,8 @@
if [ -n "$CHILDREN" ]; then
if [ -n "$HAVE_DEBCONF" ]; then
# ask the question
- safe_debconf db_input high xdm/stop_running_server_with_children
- safe_debconf db_go
+ run db_input high xdm/stop_running_server_with_children
+ run db_go
# what did the user say?
ANSWER=
if db_get xdm/stop_running_server_with_children; then
@@ -66,7 +66,7 @@
fi
# forget that we have seen the question; this is the sort of
# non-configuration question that should be asked every time
- safe_debconf db_fset xdm/stop_running_server_with_children seen false
+ run db_fset xdm/stop_running_server_with_children seen false
fi
else
STOP=yes
@@ -88,12 +88,12 @@
if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then
if [ -n "$HAVE_DEBCONF" ]; then
# disown this question
- safe_debconf db_unregister shared/default-x-display-manager
+ run db_unregister shared/default-x-display-manager
# does the question still exist?
if db_get shared/default-x-display-manager; then
if db_metaget shared/default-x-display-manager owners; then
observe "X display managers now available are \"$OWNERS\""
- safe_debconf db_subst shared/default-x-display-manager choices "$RET"
+ run db_subst shared/default-x-display-manager choices "$RET"
fi
DEFAULT_DISPLAY_MANAGER=
if db_get shared/default-x-display-manager; then
@@ -114,9 +114,9 @@
fi
fi
# ask the user to choose a new default
- safe_debconf db_fset shared/default-x-display-manager seen false
- safe_debconf db_input critical shared/default-x-display-manager
- safe_debconf db_go
+ run db_fset shared/default-x-display-manager seen false
+ run db_input critical shared/default-x-display-manager
+ run db_go
# if the default display manager file doesn't exist, write it with
# the path to the new default display manager
if [ ! -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then
Modified: trunk/debian/xfree86-common.config.in
===================================================================
--- trunk/debian/xfree86-common.config.in 2004-04-14 18:25:27 UTC (rev 1253)
+++ trunk/debian/xfree86-common.config.in 2004-04-14 19:14:43 UTC (rev 1254)
@@ -19,11 +19,11 @@
# is this an unofficial Debian package?
if [ -z "$OFFICIAL_BUILD" ]; then
observe "unofficial build detected; issuing debconf note as warning"
- safe_debconf db_register xfree86-common/experimental_packages \
+ run db_register xfree86-common/experimental_packages \
xfree86-common/nag
- safe_debconf db_input high xfree86-common/nag
- safe_debconf db_go
- safe_debconf db_unregister xfree86-common/nag
+ run db_input high xfree86-common/nag
+ run db_go
+ run db_unregister xfree86-common/nag
fi
exit 0
Modified: trunk/debian/xserver-common.config.in
===================================================================
--- trunk/debian/xserver-common.config.in 2004-04-14 18:25:27 UTC (rev 1253)
+++ trunk/debian/xserver-common.config.in 2004-04-14 19:14:43 UTC (rev 1254)
@@ -121,7 +121,7 @@
if [ -n "$CURRENT_ALLOWED_USERS" ]; then
observe "setting xserver-common/xwrapper/allowed_users from configuration" \
"file"
- safe_debconf db_set xserver-common/xwrapper/allowed_users \
+ run db_set xserver-common/xwrapper/allowed_users \
$(allowed_users_actual_to_english \
"$CURRENT_ALLOWED_USERS")
fi
@@ -129,18 +129,18 @@
if [ -n "$CURRENT_NICE_VALUE" ]; then
observe "setting xserver-common/xwrapper/nice_value from configuration file"
if validate_nice_value "$CURRENT_NICE_VALUE"; then
- safe_debconf db_set xserver-common/xwrapper/nice_value \
+ run db_set xserver-common/xwrapper/nice_value \
"$CURRENT_NICE_VALUE"
fi
fi
-safe_debconf db_input low xserver-common/xwrapper/allowed_users
-safe_debconf db_go
+run db_input low xserver-common/xwrapper/allowed_users
+run db_go
RET=
if db_get xserver-common/xwrapper/allowed_users; then
if [ -n "$RET" ]; then
- safe_debconf db_set xserver-common/xwrapper/actual_allowed_users \
+ run db_set xserver-common/xwrapper/actual_allowed_users \
$(allowed_users_english_to_actual "$RET")
fi
fi
@@ -155,17 +155,17 @@
# make sure it's really safe; if not, use the default
if ! validate_nice_value "$RET"; then
SAFE="$NICE_DEFAULT"
- safe_debconf db_set xserver-common/xwrapper/nice_value "$SAFE"
+ run db_set xserver-common/xwrapper/nice_value "$SAFE"
fi
set +e
while :; do
- safe_debconf db_input low xserver-common/xwrapper/nice_value
+ run db_input low xserver-common/xwrapper/nice_value
# is the question going to be asked?
if [ $? -eq 30 ]; then
break # no; bail out of validation loop
fi
- safe_debconf db_go
+ run db_go
RET=
if db_get xserver-common/xwrapper/nice_value; then
# string, needs input validation
@@ -175,12 +175,12 @@
else
# the input was invalid; restore the known good value in case we are
# interrupted before the user provides a valid one
- safe_debconf db_set xserver-common/xwrapper/nice_value "$SAFE"
- safe_debconf db_fset xserver-common/xwrapper/nice_value seen false
+ run db_set xserver-common/xwrapper/nice_value "$SAFE"
+ run db_fset xserver-common/xwrapper/nice_value seen false
# now display the error message
- safe_debconf db_fset xserver-common/xwrapper/nice_value/error seen false
- safe_debconf db_input critical xserver-common/xwrapper/nice_value/error
- safe_debconf db_go
+ run db_fset xserver-common/xwrapper/nice_value/error seen false
+ run db_input critical xserver-common/xwrapper/nice_value/error
+ run db_go
fi
fi
done
Modified: trunk/debian/xserver-common.preinst.in
===================================================================
--- trunk/debian/xserver-common.preinst.in 2004-04-14 18:25:27 UTC (rev 1253)
+++ trunk/debian/xserver-common.preinst.in 2004-04-14 19:14:43 UTC (rev 1254)
@@ -93,8 +93,8 @@
fi
fi
# in other news, unregister the now no-longer-used templates
- safe_debconf db_unregister xserver-common/manage_config_with_debconf
- safe_debconf db_unregister xserver-common/move_existing_nondebconf_config
+ run db_unregister xserver-common/manage_config_with_debconf
+ run db_unregister xserver-common/move_existing_nondebconf_config
fi
fi
Reply to: