[Dbconfig-common-devel] dbconfig-common/dpkg common,1.27,1.28
xerakko-guest@haydn.debian.org
xerakko-guest@haydn.debian.org
Update of /cvsroot/dbconfig-common/dbconfig-common/dpkg
In directory haydn:/tmp/cvs-serv4067/dpkg
Modified Files:
common
Log Message:
Answer to abort/retry with/without questions if installation fails work
Index: common
===================================================================
RCS file: /cvsroot/dbconfig-common/dbconfig-common/dpkg/common,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- common 14 May 2005 17:50:48 -0000 1.27
+++ common 17 May 2005 11:07:32 -0000 1.28
@@ -319,19 +319,33 @@
db_get $dbc_package/install-error
_dbc_on_error_option="$RET"
- # forget that we've seen all the debconf questions
- for f in $dbc_register_templates; do
- db_fset $dbc_package/$f seen false
- done
-
if [ "$_dbc_on_error_option" = "abort" ]; then
+ # forget that we've seen all the debconf questions
+ for f in $dbc_register_templates; do
+ db_fset $dbc_package/$f seen false
+ done
+
echo "dbconfig-common: $dbc_package $dbc_command: aborted." >&2
dbc_postinst_cleanup
return 1
fi
if [ "$_dbc_on_error_option" = "retry" ]; then
- echo "dbconfig-common: $dbc_package $dbc_command: retrying." >&2
+ # forget that we've seen all the debconf questions
+ for f in $dbc_register_templates; do
+ db_fset $dbc_package/$f seen false
+ done
+
+ echo "dbconfig-common: $dbc_package $dbc_command: trying again." >&2
+ . /usr/share/dbconfig-common/dpkg/config
+ dbc_go $dbc_package configure $dbc_oldversion
+ . /usr/share/dbconfig-common/dpkg/postinst
+ dbc_go $dbc_package $dbc_command $dbc_oldversion
+ fi
+
+ if [ "$_dbc_on_error_option" = "retry (skip questions)" ]; then
+ echo "dbconfig-common: $dbc_package $dbc_command: trying again (skip questions)." >&2
+ . /usr/share/dbconfig-common/dpkg/postinst
dbc_go $dbc_package $dbc_command $dbc_oldversion
fi
}
@@ -350,21 +364,33 @@
db_get $dbc_package/upgrade-error
_dbc_on_error_option="$RET"
- # forget that we've seen all the debconf questions
- for f in $dbc_register_templates; do
- db_fset $dbc_package/$f seen false
- done
-
if [ "$_dbc_on_error_option" = "abort" ]; then
+ # forget that we've seen all the debconf questions
+ for f in $dbc_register_templates; do
+ db_fset $dbc_package/$f seen false
+ done
echo "dbconfig-common: $dbc_package $dbc_command: aborted." >&2
dbc_postinst_cleanup
return 1
fi
if [ "$_dbc_on_error_option" = "retry" ]; then
+ # forget that we've seen all the debconf questions
+ for f in $dbc_register_templates; do
+ db_fset $dbc_package/$f seen false
+ done
echo "dbconfig-common: $dbc_package $dbc_command: retrying." >&2
+ . /usr/share/dbconfig-common/dpkg/config
+ dbc_go $dbc_package configure $dbc_oldversion
+ . /usr/share/dbconfig-common/dpkg/postinst
dbc_go $dbc_package $dbc_command $dbc_oldversion
fi
+
+ if [ "$_dbc_on_error_option" = "retry (skip questions)" ]; then
+ echo "dbconfig-common: $dbc_package $dbc_command: trying again." >&2
+ . /usr/share/dbconfig-common/dpkg/postinst
+ dbc_go $dbc_package $dbc_command $dbc_oldversion
+ fi
}
##
@@ -381,18 +407,25 @@
db_get $dbc_package/remove-error
_dbc_on_error_option="$RET"
- # forget that we've seen all the debconf questions
- for f in $dbc_register_templates; do
- db_fset $dbc_package/$f seen false
- done
-
if [ "$_dbc_on_error_option" = "abort" ]; then
+ # forget that we've seen all the debconf questions
+ for f in $dbc_register_templates; do
+ db_fset $dbc_package/$f seen false
+ done
echo "dbconfig-common: $dbc_package $dbc_command: aborted." >&2
dbc_postinst_cleanup
+ return 1
fi
if [ "$_dbc_on_error_option" = "retry" ]; then
+ # forget that we've seen all the debconf questions
+ for f in $dbc_register_templates; do
+ db_fset $dbc_package/$f seen false
+ done
echo "dbconfig-common: $dbc_package $dbc_command: retrying." >&2
+ . /usr/share/dbconfig-common/dpkg/config
+ dbc_go $dbc_package configure $dbc_oldversion
+ . /usr/share/dbconfig-common/dpkg/postinst
dbc_go $dbc_package $dbc_command $dbc_oldversion
fi
}