]> git.saurik.com Git - apt.git/commitdiff
* merged with mainline
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 9 Aug 2006 12:45:01 +0000 (14:45 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 9 Aug 2006 12:45:01 +0000 (14:45 +0200)
apt-pkg/depcache.cc
apt-pkg/depcache.h
cmdline/apt-get.cc
configure.in
debian/changelog

index 58d1d25e54ed7c2b633f39d69dee14010773589f..8560ce4fda120cbf9b388c440193dd961f492a49 100644 (file)
@@ -17,7 +17,6 @@
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/configuration.h>
-
 #include <apti18n.h>    
                                                                        /*}}}*/
 
@@ -610,7 +609,8 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
       installed */
    StateCache &P = PkgState[Pkg->ID];
    P.iFlags &= ~AutoKept;
-   if (P.InstBroken() == false && (P.Mode == ModeInstall ||
+   if ((P.InstPolicyBroken() == false && P.InstBroken() == false) && 
+       (P.Mode == ModeInstall ||
        P.CandidateVer == (Version *)Pkg.CurrentVer()))
    {
       if (P.CandidateVer == (Version *)Pkg.CurrentVer() && P.InstallVer == 0)
@@ -621,11 +621,9 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
    // See if there is even any possible instalation candidate
    if (P.CandidateVer == 0)
       return;
-   
    // We dont even try to install virtual packages..
    if (Pkg->VersionList == 0)
       return;
-   
    /* Target the candidate version and remove the autoflag. We reset the
       autoflag below if this was called recursively. Otherwise the user
       should have the ability to de-auto a package by changing its state */
@@ -869,6 +867,13 @@ pkgCache::VerIterator pkgDepCache::Policy::GetCandidateVer(PkgIterator Pkg)
 /* */
 bool pkgDepCache::Policy::IsImportantDep(DepIterator Dep)
 {
-   return Dep.IsCritical();
+   if(Dep.IsCritical())
+      return true;
+   else if(Dep->Type == pkgCache::Dep::Recommends)
+      return  _config->FindB("APT::Install-Recommends", false);
+   else if(Dep->Type == pkgCache::Dep::Suggests)
+     return _config->FindB("APT::Install-Suggests", false);
+
+   return false;
 }
                                                                        /*}}}*/
index 6d51920e936d6fc0b2001bcafd09bca7e9c1e108..3f9f671405db8230374cfc1c9c85c1cbbbb11c11 100644 (file)
@@ -98,6 +98,7 @@ class pkgDepCache : protected pkgCache::Namespace
       inline bool Held() const {return Status != 0 && Keep();};
       inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;};
       inline bool InstBroken() const {return (DepState & DepInstMin) != DepInstMin;};
+      inline bool InstPolicyBroken() const {return (DepState & DepInstPolicy) != DepInstPolicy;};
       inline bool Install() const {return Mode == ModeInstall;};
       inline VerIterator InstVerIter(pkgCache &Cache)
                 {return VerIterator(Cache,InstallVer);};
index d4a6bee3215152324c2ec7a38ad3d03d5ce94dc3..6979fa8f2cd6fd991d20d5b8ffcdd49131615802 100644 (file)
@@ -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;
 }
                                                                        /*}}}*/
index fc4eff203d5fead71051b9cbdf75c1c8976e6574..f0b0d6703af0f057455389e7258eefc6230852fd 100644 (file)
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.45")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.45.1")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index e748fcebbac19dc8dc5749b7441e1f15ae0f25a5..ec802a80c44ab6f9dec0fd94c398c4c3078cfe4a 100644 (file)
@@ -3,7 +3,7 @@ apt (0.6.45.1) unstable; urgency=low
   * debian/control:
     - switched to libdb4.4 for building
 
- --
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Wed,  9 Aug 2006 14:27:54 +0200
 
 apt (0.6.45) unstable; urgency=low