diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-05-24 20:10:11 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-05-24 20:10:11 +0200 |
commit | 642ebc1a04c9c7915474c57f1143a9389ee6636a (patch) | |
tree | b7c06261140116938706682f4fd6fb38ff0a4b66 /cmdline | |
parent | b3514c569564ebd7ee90c04f0af325510e129386 (diff) |
- show at the end of the install process a list of disappeared packages
* apt-pkg/packagemanager.h:
- export info about disappeared packages with GetDisappearedPackages()
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index dd5ef1743..44235e358 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1044,7 +1044,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (Res == pkgPackageManager::Failed || _error->PendingError() == true) return false; if (Res == pkgPackageManager::Completed) - return true; + break; // Reload the fetcher object and loop again for media swapping Fetcher.Shutdown(); @@ -1052,7 +1052,24 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, return false; _system->Lock(); - } + } + + std::set<std::string> const disappearedPkgs = PM->GetDisappearedPackages(); + if (disappearedPkgs.empty() == true) + return true; + + string disappear; + for (std::set<std::string>::const_iterator d = disappearedPkgs.begin(); + d != disappearedPkgs.end(); ++d) + disappear.append(*d).append(" "); + + ShowList(c1out, P_("The following package disappeared from your system as\n" + "all files have been overwritten by other packages:", + "The following packages disappeared from your system as\n" + "all files have been overwritten by other packages:", disappearedPkgs.size()), disappear, ""); + c0out << _("Note: This is done automatic and on purpose by dpkg.") << std::endl; + + return true; } /*}}}*/ // TryToInstall - Try to install a single package /*{{{*/ |