dist-upgrade: warn about muliple repos and show hint.
authorJán Kupec <jkupec@suse.cz>
Fri, 20 Nov 2009 11:20:58 +0000 (12:20 +0100)
committerJán Kupec <jkupec@suse.cz>
Fri, 20 Nov 2009 11:20:58 +0000 (12:20 +0100)
- this is the easy approach to fate #305553

src/Zypper.cc

index 9504025..ea0292b 100644 (file)
@@ -3829,6 +3829,15 @@ void Zypper::doCommand()
     }
 
     initRepoManager();
+
+    if (!copts.count("repo") && !copts.count("from")
+        && repoManager().knownRepositories().size() > 1)
+      this->out().warning(str::form(_(
+        "You are about to do a distribution upgrade with all enabled"
+        " repositories. Make sure these repositories are compatible before you"
+        " continue. See '%s' for more information about this command."),
+        "man zypper"));
+
     init_target(*this);
     init_repos(*this);
     if (exitCode() != ZYPPER_EXIT_OK)