summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-08-14 23:45:17 +0200
committerJulian Andres Klode <jak@debian.org>2015-08-14 23:47:30 +0200
commitdf53919b1ea2148f111150578ee9b9618b84d01a (patch)
treec0b20c6c203ea254297eac3d0828350d023232d0 /cmdline/apt-get.cc
parent516582f486e967c8b9ca8635b524757ba12131ba (diff)
apt-get: allow non-root --print-uris build-dep
Closes: #283400
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 80e344740..acf6c2155 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -966,8 +966,10 @@ static bool DoBuildDep(CommandLine &CmdL)
CacheFile Cache;
_config->Set("APT::Install-Recommends", false);
+
+ bool WantLock = _config->FindB("APT::Get::Print-URIs", false) == false;
- if (Cache.Open(true) == false)
+ if (Cache.Open(WantLock) == false)
return false;
if (CmdL.FileSize() <= 1)