summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-05-02 09:44:30 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-05-02 09:44:30 +0200
commit60681f9354217c830943315951e6559253bfa832 (patch)
treeb199dfdb68a24b43b7eac1417fcda157129556fc /cmdline/apt-get.cc
parent42c458038bf47f535a6e70646a08e918e62e6d24 (diff)
* depcache.cc:
- added APT::Install-{Recommends,Suggests} global option * depcache.h: - added DepCache::State::InstPolicyBroken() to check if the current install state violates the policy (compated with InstBroken() that only checks for the minimal requirements)
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index d4a6bee32..6979fa8f2 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1145,9 +1145,11 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache,
else
ExpectedInst++;
- // Install it with autoinstalling enabled.
- if (State.InstBroken() == true && BrokenFix == false)
+ // Install it with autoinstalling enabled (if we not respect the minial
+ // required deps or the policy)
+ if ((State.InstBroken() == true || State.InstPolicyBroken() == true) && BrokenFix == false)
Cache.MarkInstall(Pkg,true);
+
return true;
}
/*}}}*/