summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-03-26 12:53:51 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-03-26 12:53:51 +0100
commitede85dc09f55a50d61b96186e1f98a4f13eb57ff (patch)
tree781743f81c9c956c181d5908d2102318a73f3f4b
parentcc26da01ef43686d67959ef080e5492410d20e4e (diff)
* cmdline/apt-get.cc:
- do not show simulation notice for non-root commands (Closes: #619072)
-rw-r--r--cmdline/apt-get.cc5
-rw-r--r--debian/changelog4
2 files changed, 7 insertions, 2 deletions
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"
diff --git a/debian/changelog b/debian/changelog
index 2af2517e1..8e15a8060 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,8 +25,10 @@ apt (0.8.13.1) UNRELEASED; urgency=low
* apt-pkg/aptconfiguration.cc:
- use dpkg --print-foreign-architectures to get multiarch configuration
if non is specified with APT::Architectures (Closes: #612958)
+ * cmdline/apt-get.cc:
+ - do not show simulation notice for non-root commands (Closes: #619072)
- -- David Kalnischkies <kalnischkies@gmail.com> Sat, 26 Mar 2011 12:26:32 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com> Sat, 26 Mar 2011 12:53:00 +0100
apt (0.8.13) unstable; urgency=low