summaryrefslogtreecommitdiff
path: root/apt-pkg/init.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-23 19:41:58 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-26 22:17:54 +0200
commit8757a0fdeee00ea6a7cc717188a0e129ad8a553c (patch)
treecd13473faa06c189bfd915b835af065e6a2abf11 /apt-pkg/init.cc
parentdd7758b9245275a31fde70218db9a531c5859c26 (diff)
Make directory paths configurable
This allows other vendors to use different paths, or to build your own APT in /opt for testing. Note that this uses + 1 in some places, as the paths we receive are absolute, but we need to strip of the initial /.
Diffstat (limited to 'apt-pkg/init.cc')
-rw-r--r--apt-pkg/init.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index fa679e6c6..282c0daf0 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -47,19 +47,19 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.CndSet("Dir","/");
// State
- Cnf.CndSet("Dir::State","var/lib/apt/");
+ Cnf.CndSet("Dir::State", STATE_DIR + 1);
Cnf.CndSet("Dir::State::lists","lists/");
Cnf.CndSet("Dir::State::cdroms","cdroms.list");
Cnf.CndSet("Dir::State::mirrors","mirrors/");
// Cache
- Cnf.CndSet("Dir::Cache","var/cache/apt/");
+ Cnf.CndSet("Dir::Cache", CACHE_DIR + 1);
Cnf.CndSet("Dir::Cache::archives","archives/");
Cnf.CndSet("Dir::Cache::srcpkgcache","srcpkgcache.bin");
Cnf.CndSet("Dir::Cache::pkgcache","pkgcache.bin");
// Configuration
- Cnf.CndSet("Dir::Etc","etc/apt/");
+ Cnf.CndSet("Dir::Etc", CONF_DIR + 1);
Cnf.CndSet("Dir::Etc::sourcelist","sources.list");
Cnf.CndSet("Dir::Etc::sourceparts","sources.list.d");
Cnf.CndSet("Dir::Etc::main","apt.conf");
@@ -69,12 +69,12 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.CndSet("Dir::Etc::preferencesparts","preferences.d");
Cnf.CndSet("Dir::Etc::trusted", "trusted.gpg");
Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d");
- Cnf.CndSet("Dir::Bin::methods","/usr/lib/apt/methods");
- Cnf.CndSet("Dir::Bin::solvers::","/usr/lib/apt/solvers");
+ Cnf.CndSet("Dir::Bin::methods", LIBEXEC_DIR "/methods");
+ Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/apt/solvers");
Cnf.CndSet("Dir::Media::MountPath","/media/apt");
// State
- Cnf.CndSet("Dir::Log","var/log/apt");
+ Cnf.CndSet("Dir::Log", LOG_DIR + 1);
Cnf.CndSet("Dir::Log::Terminal","term.log");
Cnf.CndSet("Dir::Log::History","history.log");
Cnf.CndSet("Dir::Log::Planner","eipp.log.xz");