diff options
author | Michael Vogt <egon@debian-devbox> | 2012-06-19 13:56:39 +0200 |
---|---|---|
committer | Michael Vogt <egon@debian-devbox> | 2012-06-19 13:56:39 +0200 |
commit | 60cb4b09173ef64528dfbe92f016240c6fec3605 (patch) | |
tree | 48ce686d588f75c44287e15186c38b9cb3d6c92c /cmdline/apt-get.cc | |
parent | e3026ce49a0839dfbe494af7e60d91bc7204f88e (diff) | |
parent | 567785b979d9b71ceb92edda82e4f15bb40a2e61 (diff) |
merged from donkult
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 870c77280..d4c7f4200 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2362,6 +2362,8 @@ bool DoDownload(CommandLine &CmdL) pkgRecords Recs(Cache); pkgSourceList *SrcList = Cache.GetSourceList(); + bool gotAll = true; + for (APT::VersionList::const_iterator Ver = verset.begin(); Ver != verset.end(); ++Ver) @@ -2372,11 +2374,19 @@ bool DoDownload(CommandLine &CmdL) pkgRecords::Parser &rec=Recs.Lookup(Ver.FileList()); pkgCache::VerFileIterator Vf = Ver.FileList(); if (Vf.end() == true) - return _error->Error("Can not find VerFile"); + { + _error->Error("Can not find VerFile for %s in version %s", Pkg.FullName().c_str(), Ver.VerStr()); + gotAll = false; + continue; + } pkgCache::PkgFileIterator F = Vf.File(); pkgIndexFile *index; if(SrcList->FindIndex(F, index) == false) - return _error->Error("FindIndex failed"); + { + _error->Error(_("Can't find a source to download version '%s' of '%s'"), Ver.VerStr(), Pkg.FullName().c_str()); + gotAll = false; + continue; + } string uri = index->ArchiveURI(rec.FileName()); strprintf(descr, _("Downloading %s %s"), Pkg.Name(), Ver.VerStr()); // get the most appropriate hash @@ -2392,6 +2402,8 @@ bool DoDownload(CommandLine &CmdL) // get the file new pkgAcqFile(&Fetcher, uri, hash.toStr(), (*Ver)->Size, descr, Pkg.Name(), "."); } + if (gotAll == false) + return false; // Just print out the uris and exit if the --print-uris flag was used if (_config->FindB("APT::Get::Print-URIs") == true) |