From ede85dc09f55a50d61b96186e1f98a4f13eb57ff Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 26 Mar 2011 12:53:51 +0100 Subject: * cmdline/apt-get.cc: - do not show simulation notice for non-root commands (Closes: #619072) --- cmdline/apt-get.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 6a30c5a50..c793b67a5 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -3278,7 +3278,10 @@ 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) + if (getuid() != 0 && _config->FindB("APT::Get::Simulate") == true && + (CmdL.FileSize() == 0 || + (strcmp(CmdL.FileList[0], "source") != 0 && strcmp(CmdL.FileList[0], "download") != 0 && + strcmp(CmdL.FileList[0], "changelog") != 0))) { if (_config->FindB("APT::Get::Show-User-Simulation-Note",true) == true) cout << _("NOTE: This is only a simulation!\n" -- cgit v1.2.3