[Dbconfig-common-changes] [dbconfig-common] r230 - trunk/dpkg
Sean Finney
seanius at costa.debian.org
Thu May 25 00:39:58 CEST 2006
Author: seanius
Date: 2006-05-24 22:39:58 +0000 (Wed, 24 May 2006)
New Revision: 230
Modified:
trunk/dpkg/postinst
trunk/dpkg/prerm
Log:
fix a couple loose global variables, reorder stuff in prerm. hope none of this broke things :)
Modified: trunk/dpkg/postinst
===================================================================
--- trunk/dpkg/postinst 2006-05-24 22:27:31 UTC (rev 229)
+++ trunk/dpkg/postinst 2006-05-24 22:39:58 UTC (rev 230)
@@ -2,7 +2,7 @@
### load up common variables and functions
###
dbc_go(){
- local prev_dbc_upgrade importing_from_non_dbc upgrading f tsubstfile
+ local prev_dbc_upgrade importing_from_non_dbc upgrading f tsubstfile upgrades_pending dumpfile
. /usr/share/dbconfig-common/dpkg/common
dbc_debug "(postinst) dbc_go() $@"
@@ -12,6 +12,8 @@
dbc_read_package_debconf $@
# and write them to file.
dbc_write_package_config
+ # finally, read in the configuration from this file
+ dbc_read_package_config
###
### begin main code execution
@@ -127,10 +129,10 @@
if [ "$upgrading" ]; then
- _dbc_upgrades_pending=`_dbc_find_upgrades`
+ upgrades_pending=`_dbc_find_upgrades`
# if there are any upgrades to be applied
- if [ "$_dbc_upgrades_pending" ]; then
+ if [ "$upgrades_pending" ]; then
# ask if they want our help in the process at all
prev_dbc_upgrade="$dbc_upgrade"
@@ -152,15 +154,15 @@
###
# this is the file into which upgrade backups go
- _dbc_dbfile=/var/cache/dbconfig-common/backups/${dbc_package}_${dbc_oldversion}.$dbc_dbtype
- dbc_logline "creating database backup in $_dbc_dbfile"
+ dumpfile=/var/cache/dbconfig-common/backups/${dbc_package}_${dbc_oldversion}.$dbc_dbtype
+ dbc_logline "creating database backup in $dumpfile"
# backup before we upgrade
_dbc_asuser=""
- $dbc_dump_cmd > $_dbc_dbfile
+ $dbc_dump_cmd > $dumpfile
fi
# now perform the updates
- for f in $_dbc_upgrades_pending; do
+ for f in $upgrades_pending; do
_dbc_apply_upgrades $f
done
Modified: trunk/dpkg/prerm
===================================================================
--- trunk/dpkg/prerm 2006-05-24 22:27:31 UTC (rev 229)
+++ trunk/dpkg/prerm 2006-05-24 22:39:58 UTC (rev 230)
@@ -9,6 +9,11 @@
dbc_config $@
+ ###
+ ### get all the settings we need
+ ###
+ dbc_read_package_config
+
need_admin_pw="yup"
if [ "$dbc_command" = "remove" ]; then
@@ -29,11 +34,6 @@
fi
###
- ### get all the settings we need
- ###
- dbc_read_package_config
-
- ###
### ask the admin if the database should be purged
###
db_input high $dbc_package/purge || true
More information about the Dbconfig-common-changes
mailing list