]>
git.saurik.com Git - apt.git/blob - apt-private/private-main.cc
5 #include <apt-pkg/configuration.h>
6 #include "private-main.h"
10 void CheckSimulateMode(CommandLine
&CmdL
)
12 // simulate user-friendly if apt-get has no root privileges
13 if (getuid() != 0 && _config
->FindB("APT::Get::Simulate") == true &&
14 (CmdL
.FileSize() == 0 ||
15 (strcmp(CmdL
.FileList
[0], "source") != 0 && strcmp(CmdL
.FileList
[0], "download") != 0 &&
16 strcmp(CmdL
.FileList
[0], "changelog") != 0)))
18 if (_config
->FindB("APT::Get::Show-User-Simulation-Note",true) == true)
19 std::cout
<< _("NOTE: This is only a simulation!\n"
20 " apt-get needs root privileges for real execution.\n"
21 " Keep also in mind that locking is deactivated,\n"
22 " so don't depend on the relevance to the real current situation!"
24 _config
->Set("Debug::NoLocking",true);