summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-07-14 12:08:16 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-07-14 12:08:16 +0200
commitd4cfaed3d822b207f24ce11768ee14682a0c8f6b (patch)
tree21c6ecc40a9bde609db97bb99cf0ec3c48f5b97d /cmdline
parent2dcf7b8f9b9e037901339ddef7d94a6a2bab90db (diff)
* cmdline/apt-get.cc:
- add an --assume-no option for testing to say 'no' to everything
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 66ebd30b8..94e078cb3 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -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},