summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc19
-rw-r--r--apt-pkg/deb/deblistparser.cc11
2 files changed, 13 insertions, 17 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index c6a49653b..52c516090 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -772,12 +772,6 @@ pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
// File was already in place. It needs to be re-verified
// because Release might have changed, so Move it into partial
Rename(Final,DestFile);
- // unlink the file and do not try to use I-M-S and Last-Modified
- // if the users proxy is broken
- if(_config->FindB("Acquire::BrokenProxy", false) == true) {
- std::cerr << "forcing re-get of the signature file as requested" << std::endl;
- unlink(DestFile.c_str());
- }
}
QueueURI(Desc);
@@ -827,18 +821,19 @@ void pkgAcqMetaSig::Done(string Message,unsigned long Size,string MD5,
/*}}}*/
void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
- // Delete any existing sigfile, so that this source isn't
- // mistakenly trusted
- string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
- unlink(Final.c_str());
- // if we get a timeout if fail
+ // if we get a network error we fail gracefully
if(LookupTag(Message,"FailReason") == "Timeout" ||
- LookupTag(Message,"FailReason") == "TmpResolveFailure") {
+ LookupTag(Message,"FailReason") == "TmpResolveFailure" ||
+ LookupTag(Message,"FailReason") == "ConnectionRefused") {
Item::Failed(Message,Cnf);
return;
}
+ // Delete any existing sigfile when the acquire failed
+ string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
+ unlink(Final.c_str());
+
// queue a pkgAcqMetaIndex with no sigfile
new pkgAcqMetaIndex(Owner, MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,
"", IndexTargets, MetaIndexParser);
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 441bb826f..c2b26b5eb 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -547,11 +547,12 @@ bool debListParser::ParseProvides(pkgCache::VerIterator Ver)
Start = ParseDepends(Start,Stop,Package,Version,Op);
if (Start == 0)
return _error->Error("Problem parsing Provides line");
- if (Op != pkgCache::Dep::NoOp)
- return _error->Error("Malformed provides line");
-
- if (NewProvides(Ver,Package,Version) == false)
- return false;
+ if (Op != pkgCache::Dep::NoOp) {
+ _error->Warning("Ignoring Provides line with DepCompareOp for package %s", Package.c_str());
+ } else {
+ if (NewProvides(Ver,Package,Version) == false)
+ return false;
+ }
if (Start == Stop)
break;