diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-07-15 23:57:07 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-07-15 23:57:07 +0200 |
commit | 6009e60d0192832277242438ad7ca2fc24a4c075 (patch) | |
tree | ca691ec88f3522952210a534df6551813b80778c /apt-pkg/cachefile.cc | |
parent | 9d800312c90b7d3b52f2f4c3cea3ebfc67bf000b (diff) |
display warnings instead of errors if the parts dirs doesn't exist
Parts dirs are /etc/apt/{sources.list,apt.conf,preferences}.d
(in the default setup)
Diffstat (limited to 'apt-pkg/cachefile.cc')
-rw-r--r-- | apt-pkg/cachefile.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 0b1efb9ff..790312dc8 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -48,6 +48,7 @@ pkgCacheFile::~pkgCacheFile() /* */ bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock) { + const bool ErrorWasEmpty = _error->empty(); if (WithLock == true) if (_system->Lock() == false) return false; @@ -70,7 +71,7 @@ bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock) return _error->Error(_("The package lists or status file could not be parsed or opened.")); /* This sux, remove it someday */ - if (_error->empty() == false) + if (ErrorWasEmpty == true && _error->empty() == false) _error->Warning(_("You may want to run apt-get update to correct these problems")); Cache = new pkgCache(Map); @@ -91,6 +92,7 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock) Policy = new pkgPolicy(Cache); if (_error->PendingError() == true) return false; + if (ReadPinFile(*Policy) == false || ReadPinDir(*Policy) == false) return false; |