Bugzilla – Attachment 6183 Details for
Bug 6700
Better handling of version numbers in updatedatabase
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed off patch for updatedatabase
0001-6700-Better-handling-of-version-numbers-in-updatedat.patch (text/plain), 1.97 KB, created by
Julian Maurice
on 2011-11-04 08:15:11 UTC
(
hide
)
Description:
Signed off patch for updatedatabase
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2011-11-04 08:15:11 UTC
Size:
1.97 KB
patch
obsolete
>From ffe1107073576635834de22d558e9168b483adb5 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 30 Jun 2011 09:34:23 +0200 >Subject: [PATCH] 6700: Better handling of version numbers in updatedatabase > >Contains a few lines of code for updatedatabase routines SetVersion and TransformToNum in order to facilitate testing new db revisions which are still marked XXX. >Currently, the XXX as added in a proposed patch generates an error in the version compare. Additionally, running SetVersion while testing the upgrade is annoying and not needed. In testing stage you would like to keep your version number as is. The version number should of course be incremented when the patch is pushed. A simple test accomplishes that. > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > installer/data/mysql/updatedatabase.pl | 8 +++++++- > 1 files changed, 7 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index a8cd166..c2e9f7b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4592,6 +4592,10 @@ sub TransformToNum { > my $version = shift; > # remove the 3 last . to have a Perl number > $version =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/; >+ # three X's at the end indicate that you are testing patch with dbrev >+ # change it into 999 >+ # prevents error on a < comparison between strings (should be: lt) >+ $version =~ s/XXX$/999/; > return $version; > } > >@@ -4602,7 +4606,9 @@ set the DBversion in the systempreferences > =cut > > sub SetVersion { >- my $kohaversion = TransformToNum(shift); >+ return if $_[0]=~ /XXX$/; >+ #you are testing a patch with a db revision; do not change version >+ my $kohaversion = TransformToNum($_[0]); > if (C4::Context->preference('Version')) { > my $finish=$dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='Version'"); > $finish->execute($kohaversion); >-- >1.7.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6700
:
4939
|
4942
| 6183 |
6868
|
6869