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/sourcelist.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/sourcelist.cc')
-rw-r--r-- | apt-pkg/sourcelist.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index fea645078..47a08ad90 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -158,12 +158,16 @@ bool pkgSourceList::ReadMainList() // entries in sources.list.d. string Main = _config->FindFile("Dir::Etc::sourcelist"); if (FileExists(Main) == true) - Res &= ReadAppend(Main); + Res &= ReadAppend(Main); + else + _error->WarningE("FileExists",_("Unable to read %s"),Main.c_str()); string Parts = _config->FindDir("Dir::Etc::sourceparts"); if (FileExists(Parts) == true) Res &= ReadSourceDir(Parts); - + else + _error->WarningE("FileExists",_("Unable to read %s"),Parts.c_str()); + return Res; } /*}}}*/ |