From 92ba0aa02855a522b2503e170d268f9d2c38b661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Suchomel?= Date: Thu, 6 Dec 2018 11:23:47 +0100 Subject: [PATCH] upgrade: Hide the database step when it is not used (bsc#1118004) (Crowbar) database step is necessary for 6 to 7 upgrade only. --- lib/crowbar/client/app/upgrade.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/crowbar/client/app/upgrade.rb b/lib/crowbar/client/app/upgrade.rb index cf1fcd9..c50b5ac 100644 --- a/lib/crowbar/client/app/upgrade.rb +++ b/lib/crowbar/client/app/upgrade.rb @@ -305,8 +305,7 @@ def repocheck(component) catch_errors(e) end - desc "database MODE", - "Initialize Crowbar database" + desc "database MODE", "Initialize Crowbar database" long_desc <<-LONGDESC `database MODE` will set up the Crowbar database and perform the necessary migrations @@ -380,6 +379,8 @@ def database(mode) catch_errors(e) end + remove_command :database unless Config.defaults[:upgrade_versions] == "6-to-7" + desc "mode UPGRADEMODE", "Set/Get the upgrade mode (normal|non_disruptive)"