summaryrefslogtreecommitdiff
path: root/apt-pkg/init.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-02-27 22:52:34 +0100
committerMichael Vogt <mvo@debian.org>2014-02-27 22:52:34 +0100
commitfce69e7a0f38299c57ef96ae1c1dd9a5379bfd5a (patch)
treebe7d18baa836e9df166ec63f6c9fe6f94bb84b40 /apt-pkg/init.cc
parenta5e790985752c6820e08e7a7e650e1607fa826e4 (diff)
parentfc104da6a583736223b2f941e43a05ea26b63a7d (diff)
Merge branch 'debian/sid' into debian/experimental
Conflicts: apt-private/private-list.cc configure.ac debian/apt.install.in debian/changelog
Diffstat (limited to 'apt-pkg/init.cc')
-rw-r--r--apt-pkg/init.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index 76278921f..6ab5ec42d 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -44,16 +44,8 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.CndSet("APT::Install-Suggests", false);
Cnf.CndSet("Dir","/");
- // State
+ // State
Cnf.CndSet("Dir::State","var/lib/apt/");
-
- /* Just in case something goes horribly wrong, we can fall back to the
- old /var/state paths.. */
- struct stat St;
- if (stat("/var/lib/apt/.",&St) != 0 &&
- stat("/var/state/apt/.",&St) == 0)
- Cnf.CndSet("Dir::State","var/state/apt/");
-
Cnf.CndSet("Dir::State::lists","lists/");
Cnf.CndSet("Dir::State::cdroms","cdroms.list");
Cnf.CndSet("Dir::State::mirrors","mirrors/");
@@ -100,7 +92,7 @@ bool pkgInitConfig(Configuration &Cnf)
// Read an alternate config file
const char *Cfg = getenv("APT_CONFIG");
- if (Cfg != 0)
+ if (Cfg != 0 && strlen(Cfg) != 0)
{
if (RealFileExists(Cfg) == true)
Res &= ReadConfigFile(Cnf,Cfg);