summaryrefslogtreecommitdiff
path: root/apt-private/private-source.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-02-03 14:56:49 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-02-03 14:56:49 +0100
commitd603afd970e4bc84ed7176b988cd72bd9cf339b3 (patch)
tree8d09abf1955d7e5f0a8f68a4edb9ab8d1915c562 /apt-private/private-source.cc
parentcd907113561d5eb75054f981be3bcc22eee8db27 (diff)
avoid building dependency tree in 'source' command
We don't need the dependencies for obvious reasons and we don't need the candidate version either, so building a pkgDepCache is wasted effort, which we can stop doing now that build-dep cleared the path.
Diffstat (limited to 'apt-private/private-source.cc')
-rw-r--r--apt-private/private-source.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/apt-private/private-source.cc b/apt-private/private-source.cc
index c2f5f5d3a..7126feb78 100644
--- a/apt-private/private-source.cc
+++ b/apt-private/private-source.cc
@@ -317,13 +317,10 @@ struct DscFile
};
bool DoSource(CommandLine &CmdL)
{
- CacheFile Cache;
- if (Cache.Open(false) == false)
- return false;
-
if (CmdL.FileSize() <= 1)
return _error->Error(_("Must specify at least one package to fetch source for"));
+ CacheFile Cache;
// Read the source list
if (Cache.BuildSourceList() == false)
return false;