diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-06-06 15:54:06 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-06-06 15:54:06 +0200 |
commit | 35f3ed061f10a25a3fb28bc988fddbb976344c4d (patch) | |
tree | 6d3c9753bb4190b008ce8968e11d60a655f2b7f0 /apt-pkg/edsp | |
parent | 0b661a5cb3d3f25b47c21b98ddbaeb27985b8279 (diff) |
edsp: prevent it from trying to write a cache
EDSP(-like) protocols are one-shot processes working on data which
exists only as long as they run (as they get feed via a pipe), so trying
to write a cache for it is pretty pointless, especially as it will
usually fail as the cache files tend to be owned by root, but the
process is run as a unpriviledged user (either _apt if called by root,
otherwise the user of the caller).
So this was in fact only observeable with our testcases which run as
non-root and the worst which happens is that a valid cache is overridden
with an invalid one which the next run will detect and not use.
Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/edsp')
-rw-r--r-- | apt-pkg/edsp/edspsystem.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc index c3eea6f10..9b23dc3ca 100644 --- a/apt-pkg/edsp/edspsystem.cc +++ b/apt-pkg/edsp/edspsystem.cc @@ -60,11 +60,17 @@ pkgPackageManager *edspLikeSystem::CreatePM(pkgDepCache * /*Cache*/) const // System::Initialize - Setup the configuration space.. /*{{{*/ bool edspLikeSystem::Initialize(Configuration &Cnf) { + // state is included completely in the input files Cnf.Set("Dir::Etc::preferencesparts", "/dev/null"); Cnf.Set("Dir::State::status","/dev/null"); Cnf.Set("Dir::State::lists","/dev/null"); + // do not store an mmap cache + Cnf.Set("Dir::Cache::pkgcache", ""); + Cnf.Set("Dir::Cache::srcpkgcache", ""); + // the protocols only propose actions, not do them Cnf.Set("Debug::NoLocking", "true"); Cnf.Set("APT::Get::Simulate", "true"); + StatusFile.reset(nullptr); return true; } |