]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
merged from http://bzr.debian.org/bzr/apt/apt/debian-sid
[apt.git] / cmdline / apt-get.cc
index 66ebd30b817ee0e9cd8e8c8ee9cdd79f460e716c..1a03acaa8c18b68671d5ad3a72f69f59f4bcbf9e 100644 (file)
@@ -135,6 +135,11 @@ bool YnPrompt(bool Default=true)
       c1out << _("Y") << endl;
       return true;
    }
+   else if (_config->FindB("APT::Get::Assume-No",false) == true)
+   {
+      c1out << _("N") << endl;
+      return false;
+   }
 
    char response[1024] = "";
    cin.getline(response, sizeof(response));
@@ -1697,7 +1702,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
 
    // we could have removed a new dependency of a garbage package,
    // so check if a reverse depends is broken and if so install it again.
-   if (tooMuch.empty() == false && Cache->BrokenCount() != 0)
+   if (tooMuch.empty() == false && (Cache->BrokenCount() != 0 || Cache->PolicyBrokenCount() != 0))
    {
       bool Changed;
       do {
@@ -1708,8 +1713,8 @@ bool DoAutomaticRemove(CacheFile &Cache)
            for (pkgCache::DepIterator R = P.RevDependsList();
                 R.end() == false; ++R)
            {
-              if (R->Type != pkgCache::Dep::Depends &&
-                  R->Type != pkgCache::Dep::PreDepends)
+              if (R.IsNegative() == true ||
+                  Cache->IsImportantDep(R) == false)
                  continue;
               pkgCache::PkgIterator N = R.ParentPkg();
               if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false))
@@ -3245,7 +3250,8 @@ int main(int argc,const char *argv[])                                     /*{{{*/
       {'s',"dry-run","APT::Get::Simulate",0},
       {'s',"no-act","APT::Get::Simulate",0},
       {'y',"yes","APT::Get::Assume-Yes",0},
-      {'y',"assume-yes","APT::Get::Assume-Yes",0},      
+      {'y',"assume-yes","APT::Get::Assume-Yes",0},
+      {0,"assume-no","APT::Get::Assume-No",0},
       {'f',"fix-broken","APT::Get::Fix-Broken",0},
       {'u',"show-upgraded","APT::Get::Show-Upgraded",0},
       {'m',"ignore-missing","APT::Get::Fix-Missing",0},