From 63c9dc8f032263f4e6a837c7dbdd327a24288f22 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 6 Feb 2020 13:28:15 +0100 Subject: [PATCH] Bug 24131: Handle several descriptions Signed-off-by: Martin Renvoize Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- installer/data/mysql/updatedatabase.pl | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6dfe23d123..9a6194c338 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21322,16 +21322,31 @@ sub SetVersion { sub NewVersion { my ( $DBversion, $bug_number, $descriptions ) = @_; + SetVersion($DBversion); + unless ( ref($descriptions) ) { $descriptions = [ $descriptions ]; } + my $first = 1; for my $description ( @$descriptions ) { - unless ( $bug_number ) { - say sprintf "Upgrade to %s done (%s)", $DBversion, $description; + if ( @$descriptions > 1 ) { + if ( $first ) { + unless ( $bug_number ) { + say sprintf "Upgrade to %s done: %s", $DBversion, $description + } else { + say sprintf "Upgrade to %s done: Bug %s - %s", $DBversion, $bug_number, $description; + } + } + say sprintf "\t\t\t\t\t- %s", $description } else { - say sprintf "Upgrade to %s done (Bug %s - %s)", $DBversion, $bug_number, $description; + unless ( $bug_number ) { + say sprintf "Upgrade to %s done: %s", $DBversion, $description; + } else { + say sprintf "Upgrade to %s done: Bug %s - %s", $DBversion, $bug_number, $description; + } } + $first = 0; } } -- 2.39.5