diff options
author | Eric Sandall | 2010-01-12 13:41:10 -0800 |
---|---|---|
committer | Arwed von Merkatz | 2010-01-14 18:07:07 +0100 |
commit | 4fcbdf6275d552c4a3dc9fc6beb22ba15e5d9e84 (patch) | |
tree | 05211747a5d32b662487afd5dfb770d26f00eae9 | |
parent | a12281c4545ef6c5109e41fa9734e1e140f972b9 (diff) |
db: PREPARE is run before DETAILS, need to obtain VERSION elsewise
Format change is only between 4.8 and 4.7 so only check branch 4.x
May not need this for 4.8 -> 4.9
Fixes Bug #15543
(cherry picked from commit 3700903e49f7cd9473c4f0cd98f1a95d5bd36d1c)
-rw-r--r-- | database/db/HISTORY | 6 | ||||
-rwxr-xr-x | database/db/PREPARE | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/database/db/HISTORY b/database/db/HISTORY index e1096fb0a7..69f9c72ca7 100644 --- a/database/db/HISTORY +++ b/database/db/HISTORY @@ -1,3 +1,9 @@ +2010-01-12 Eric Sandall <sandalle@sourcemage.org> + * PREPARE: PREPARE is run before DETAILS, need to obtain VERSION elsewise + Format change is only between 4.8 and 4.7 so only check branch 4.x + May not need this for 4.8 -> 4.9 + Fixes Bug #15543 + 2009-0-30 Treeve Jelbert <treeve@sourcemage.org> * DETAILS: version 4.8.24 * PREPARE: added, to warn that the format of the logfile has changed diff --git a/database/db/PREPARE b/database/db/PREPARE index be935c6c7b..77118775ea 100755 --- a/database/db/PREPARE +++ b/database/db/PREPARE @@ -1,5 +1,8 @@ +local OLD_BRANCH=$(installed_version db|cut -d. -f1,2|sed 's:\.::') && +local CURRENT_BRANCH=$(gaze version $SPELL | awk 'NR == 3 {print $4}'|cut -d. -f1,2|sed 's:\.::') + if spell_ok db;then - if [[ `installed_version db` != $VERSION ]];then + if [[ "$OLD_BRANCH" != "$CURRENT_BRANCH" ]]; then if ! query 'the log file format has changed! continue?' n;then message failed return 1 |