From b63380b007b6394935a1412791243fdf939b3c92 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 19 Jan 2006 10:37:57 +0000 Subject: * don't explod if a Provides has DepCompareOp --- apt-pkg/deb/deblistparser.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index b11d2531c..d0dc7a260 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -504,11 +504,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; -- cgit v1.2.3 From 75dd8af14b76bb84a69a927ecae93f60600b9667 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 20 Feb 2006 20:38:11 +0000 Subject: * only remove the sigfile if pkgAcqMetaSig::Failed() didn't fail for a network error --- apt-pkg/acquire-item.cc | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 86f61dd00..0daca55c9 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -340,12 +340,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); @@ -395,18 +389,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); -- cgit v1.2.3 From 0c1b7be9c1a30fddd72d5b80bb2e566fe379b166 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 20 Feb 2006 21:32:41 +0000 Subject: tyop --- apt-pkg/acquire-item.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 0daca55c9..1fa929aad 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -392,7 +392,7 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) // 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; -- cgit v1.2.3