Minor update to --version-check: Let the user know if there were no suggestions

This commit is contained in:
Brian Fraser
2012-09-24 16:24:11 -03:00
parent ad78b5caa5
commit 484fcb6a2f
19 changed files with 76 additions and 38 deletions

View File

@@ -4684,8 +4684,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -3799,8 +3799,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -3243,8 +3243,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -4354,8 +4354,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -4200,8 +4200,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -3040,8 +3040,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -2947,8 +2947,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -4124,8 +4124,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -5706,8 +5706,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -5715,8 +5715,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -6737,8 +6737,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -6891,8 +6891,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -12740,8 +12740,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -3356,8 +3356,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -3979,8 +3979,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -905,8 +905,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -11181,8 +11181,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -4268,8 +4268,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {

View File

@@ -97,8 +97,10 @@ sub version_check {
print "# Percona suggests these upgrades:\n";
print join("\n", map { "# * $_" } @$advice), "\n\n";
}
elsif ( $ENV{PTVCDEBUG} || PTDEBUG ) {
_d('--version-check worked, but there were no suggestions');
else {
print "# No suggestions at this time.\n\n";
($ENV{PTVCDEBUG} || PTDEBUG )
&& _d('--version-check worked, but there were no suggestions');
}
};
if ( $EVAL_ERROR ) {