diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 17:04:11 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 17:04:11 +0000 |
commit | 97f06efd6b988ee5eda18ff40ab71ab063d2fe64 (patch) | |
tree | 583351bb9070b81718e59a5895a6eadda12bdc94 | |
parent | 50a577284663892595af1477eeea0e92712228ef (diff) |
* Clean up and simplify some of the suggests/recommends...
Author: mdz
Date: 2003-12-20 23:55:05 GMT
* Clean up and simplify some of the suggests/recommends display in apt-get
-rw-r--r-- | cmdline/apt-get.cc | 34 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 12 insertions, 25 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 315352cbf..a255270c6 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.147 2003/12/20 23:39:54 mdz Exp $ +// $Id: apt-get.cc,v 1.148 2003/12/20 23:55:05 mdz Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -1557,36 +1557,22 @@ bool DoInstall(CommandLine &CmdL) do { - if (Start->Type == pkgCache::Dep::Suggests) { + /* Skip if package is installed already, or is about to be */ + string target = string(Start.TargetPkg().Name()) + " "; + if ((*Start.TargetPkg()).SelectedState == pkgCache::State::Install + || Cache[Start.TargetPkg()].Install()) + break; - /* A suggests relations, let's see if we have it - installed already */ + /* Skip if we already saw it */ + if (int(SuggestsList.find(target)) != -1 || int(RecommendsList.find(target) != -1) + break; - string target = string(Start.TargetPkg().Name()) + " "; - if ((*Start.TargetPkg()).SelectedState == pkgCache::State::Install || Cache[Start.TargetPkg()].Install()) - break; - /* Does another package suggest it as well? If so, - don't print it twice */ - if (int(SuggestsList.find(target)) > -1) - break; + if (Start->Type == pkgCache::Dep::Suggests) { SuggestsList += target; SuggestsVersions += string(Cache[Start.TargetPkg()].CandVersion) + "\n"; } if (Start->Type == pkgCache::Dep::Recommends) { - - /* A recommends relation, let's see if we have it - installed already */ - - string target = string(Start.TargetPkg().Name()) + " "; - if ((*Start.TargetPkg()).SelectedState == pkgCache::State::Install || Cache[Start.TargetPkg()].Install()) - break; - - /* Does another package recommend it as well? If so, - don't print it twice */ - - if (int(RecommendsList.find(target)) > -1) - break; RecommendsList += target; RecommendsVersions += string(Cache[Start.TargetPkg()].CandVersion) + "\n"; } diff --git a/debian/changelog b/debian/changelog index 87f7f04eb..7a67c5848 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,8 +27,9 @@ apt (0.5.15) unstable; urgency=low * Japanese translation of documentation from Kurasawa Nozomu <nabetaro@slug.jp> (Closes: #186235) * Clarify documentation of --no-upgrade in apt-get(8) (Closes: #219743) + * Clean up and simplify some of the suggests/recommends display in apt-get - -- Matt Zimmerman <mdz@debian.org> Sat, 20 Dec 2003 15:44:21 -0800 + -- apt (0.5.14) unstable; urgency=low |