]> git.saurik.com Git - apt.git/commitdiff
* cmdline/apt-get.cc:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 14 Jul 2011 10:08:16 +0000 (12:08 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 14 Jul 2011 10:08:16 +0000 (12:08 +0200)
  - add an --assume-no option for testing to say 'no' to everything

cmdline/apt-get.cc
debian/changelog
doc/apt-get.8.xml

index 66ebd30b817ee0e9cd8e8c8ee9cdd79f460e716c..94e078cb3a912baf02547606d6e05e2a91363adb 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));
@@ -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},
index 7b1ca1df0b053256f91e567c32a8b775480db84f..5686e02fa0c6cf827965e26902af2b66b273b0c5 100644 (file)
@@ -9,13 +9,15 @@ apt (0.8.16~exp3) UNRELEASEDexperimental; urgency=low
       converting (hopefully) everything to 'long long' (Closes: #632271)
   * ftparchive/writer.cc:
     - generate all checksums in one run over the file for Release
+  * cmdline/apt-get.cc:
+    - add an --assume-no option for testing to say 'no' to everything
 
   [ Michael Vogt ]
   * merge fixes from the debian/unstable upload
   * merge lp:~mvo/apt/sha512-template to get fixes for the 
     sha1/md5 verifiation (closes: #632520)
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 13 Jul 2011 23:22:14 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 14 Jul 2011 12:01:53 +0200
 
 apt (0.8.16~exp2) experimental; urgency=low
 
index 11b53e5e78ca2da47db546cc5abc5070f648e8f0..23e682fd9e2ad700c3c99b532c89a1c30a29b912 100644 (file)
      Configuration Item: <literal>APT::Get::Assume-Yes</literal>.</para></listitem>
      </varlistentry>
 
+     <varlistentry><term><option>--assume-no</option></term>
+     <listitem><para>Automatic "no" to all prompts.
+     Configuration Item: <literal>APT::Get::Assume-No</literal>.</para></listitem>
+     </varlistentry>
+
      <varlistentry><term><option>-u</option></term><term><option>--show-upgraded</option></term>
      <listitem><para>Show upgraded packages; Print out a list of all packages that are to be
      upgraded.