From cbe90ee516d7f747f981e423f164f99eb767240b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 10 Jun 2019 14:30:32 +0200 Subject: Show details about the package with bad Provides The error messages say only which package it was trying to provide, but not which package & version tried it which can be misleading as to which package (version) is the offender. References: #930256 --- apt-pkg/deb/deblistparser.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 832e3948d..75fc2d242 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -820,7 +820,8 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver, Start = ParseDepends(Start, Stop, Package, Version, Op, false, false, false, myArch); if (Start == 0) - return _error->Error("Problem parsing dependency %zu",static_cast(Key)); // TODO + return _error->Error("Problem parsing dependency %zu of %s:%s=%s", static_cast(Key), // TODO + Ver.ParentPkg().Name(), Ver.Arch(), Ver.VerStr()); size_t const found = Package.rfind(':'); if (found == string::npos) @@ -888,9 +889,9 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver) Start = ParseDepends(Start,Stop,Package,Version,Op, false, false, false); const size_t archfound = Package.rfind(':'); if (Start == 0) - return _error->Error("Problem parsing Provides line"); + return _error->Error("Problem parsing Provides line of %s:%s=%s", Ver.ParentPkg().Name(), Ver.Arch(), Ver.VerStr()); if (unlikely(Op != pkgCache::Dep::NoOp && Op != pkgCache::Dep::Equals)) { - _error->Warning("Ignoring Provides line with non-equal DepCompareOp for package %s", Package.to_string().c_str()); + _error->Warning("Ignoring non-equal Provides for package %s in %s:%s=%s", Package.to_string().c_str(), Ver.ParentPkg().Name(), Ver.Arch(), Ver.VerStr()); } else if (archfound != string::npos) { StringView spzArch = Package.substr(archfound + 1); if (spzArch != "any") -- cgit v1.2.3-18-g5258