Your message dated Sat, 17 Jan 2015 14:52:29 +0100
with message-id <[email protected]>
and subject line Re: order of execution of things
has caused the Debian Bug report #574571,
regarding order of execution of things during database upgrade
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
574571: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574571
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dbconfig-common
Version: 1.8.45
Severity: wishlist
Tags: patch
Sometimes, I feel more flexibility is needed concerning:
- the order of execution of scripts/data
- the order of execution of elements therein
I.e. for now it is hardcoded that scripts are run first and then data
snippets are applied. What if I need to do the inverse?
Furthermure, for an upgrade to one version I can only specify one file
that would have to contain all the snippets. I'd opt for a conf.d-style
approach.
For the first wish, I wouldn't know right know how to fix.
For the second wish I am attaching an idea of a patch for the script files.
Oh maybe one could even generalize this $(find) to go over all the files
in the data/scripts directories, sort them and then execute/apply them
one after the other in whatever order they occur. That would solve both
problems and one could even
- apply data
- run a script
- apply more data
- run more scripts
- ...
(Might be less transparent though.)
Regards,
JM
--- /usr/share/dbconfig-common/dpkg/postinst.orig 2010-03-19
03:45:42.000000000 +0000
+++ /usr/share/dbconfig-common/dpkg/postinst 2010-03-19 03:57:09.000000000
+0000
@@ -282,19 +282,19 @@
vers="$1"
sqlfile="$dbc_share/data/$dbc_basepackage/upgrade/$dbc_dbtype/$vers"
admsqlfile="$dbc_share/data/$dbc_basepackage/upgrade-dbadmin/$dbc_dbtype/$vers"
-
scriptfile="$dbc_share/scripts/$dbc_basepackage/upgrade/$dbc_dbtype/$vers"
+ scriptfilepath="$dbc_share/scripts/$dbc_basepackage/upgrade/$dbc_dbtype"
# now go through script updates
- if [ -f "$scriptfile" ]; then
- dbc_logline "applying upgrade script for $dbc_oldversion ->
$vers"
+ for scriptfile in $(find "$scriptfilepath" -name "$vers*" -type f |
sort); do
+ dbc_logline "applying upgrade script for $dbc_oldversion ->
$vers: ${scriptfile#$scriptfilepath/}"
# XXX $*
if ! sh -c "$scriptfile $*"; then
dbc_error="$scriptfile exited with non-zero status"
dbc_upgrade_error "processing $scriptfile"
[ "$dbc_tried_again" ] && return 0
fi
- fi
+ done
_dbc_asuser=""
if [ -f "$admsqlfile" ]; then
--- End Message ---
--- Begin Message ---
On Sat, 10 Aug 2013 10:41:38 +0200 Paul Gevers <[email protected]> wrote:
>If what I say is true this bug could be closed.
No response received in more than a year, and believed to not being a
bug. So closing now.
Paul
signature.asc
Description: OpenPGP digital signature
--- End Message ---