diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-07-07 19:23:04 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-07-07 19:23:04 +0200 |
commit | ecf59bfcf3ca573aa15a44086a7852d1308ff1ad (patch) | |
tree | cd30feb2c94e9862be20535570c744964542e4f2 | |
parent | 9f5bf66a6218d1aec3f42713084078c18947eade (diff) | |
download | apt-ecf59bfcf3ca573aa15a44086a7852d1308ff1ad.tar.gz |
[apt-get] add possibility to hide the user simulation note
-rw-r--r-- | cmdline/apt-get.cc | 11 | ||||
-rw-r--r-- | doc/apt-get.8.xml | 3 | ||||
-rw-r--r-- | doc/examples/configure-index | 1 |
3 files changed, 9 insertions, 6 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 97c83c9b0..2ca0855b6 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2793,11 +2793,12 @@ int main(int argc,const char *argv[]) /*{{{*/ // simulate user-friendly if apt-get has no root privileges if (getuid() != 0 && _config->FindB("APT::Get::Simulate") == true) { - cout << _("NOTE: This is only a simulation!\n" - " apt-get needs root privileges for real execution.\n" - " Keep also in mind that locking is deactivated,\n" - " so don't depend on the relevance to the real current situation!" - ) << std::endl; + if (_config->FindB("APT::Get::Show-User-Simulation-Note",true) == true) + cout << _("NOTE: This is only a simulation!\n" + " apt-get needs root privileges for real execution.\n" + " Keep also in mind that locking is deactivated,\n" + " so don't depend on the relevance to the real current situation!" + ) << std::endl; _config->Set("Debug::NoLocking",true); } diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index e7f6d7094..50971d0f5 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -364,7 +364,8 @@ Configuration Item: <literal>APT::Get::Simulate</literal>.</para> <para>Simulation run as user will deactivate locking (<literal>Debug::NoLocking</literal>) - automatical and display a notice indicating that this is only a simulation. + automatical. Also a notice will be displayed indicating that this is only a simulation, + if the option <literal>APT::Get::Show-User-Simulation-Note</literal> is set (Default: true) Neigther NoLocking nor the notice will be triggered if run as root (root should know what he is doing without further warnings by <literal>apt-get</literal>).</para> diff --git a/doc/examples/configure-index b/doc/examples/configure-index index cea0dcc09..ce56f1563 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -55,6 +55,7 @@ APT Diff-Only "false"; Tar-Only "false"; Build-Dep-Automatic "true"; + Show-User-Simulation-Note "true"; }; Cache |