summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debmetaindex.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-09-09 19:43:08 +0200
committerJulian Andres Klode <jak@debian.org>2017-09-13 18:14:19 +0200
commitb32d92859be55f48b79968e1b42f75238fbab150 (patch)
tree03c23245486832850466223d3abfbadf5f6e5112 /apt-pkg/deb/debmetaindex.cc
parentccd6ebbc9ab4026a77ac2844e15ea35adfe788be (diff)
Do not warn about duplicate "legacy" targets
If a source has a legacy Contents file, and two lines mention the same archive but different components, a warning would be issued that is confusing. So, as the field is named Contents-deb-legacy, let's just not print warnings for fields containing "legacy". LP: #1697120 Closes: #839259 (cherry picked from commit 5a747462baef6cecf6ed389c7b7492443930f7ed)
Diffstat (limited to 'apt-pkg/deb/debmetaindex.cc')
-rw-r--r--apt-pkg/deb/debmetaindex.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index cba00aa8e..d64bef190 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -277,8 +277,9 @@ static void GetIndexTargetsFor(char const * const Type, std::string const &URI,
//TRANSLATOR: an identifier like Packages; Releasefile key indicating
// a file like main/binary-amd64/Packages; filename and linenumber of
// two sources.list entries
- _error->Warning(_("Target %s (%s) is configured multiple times in %s and %s"),
- T->c_str(), MetaKey.c_str(), dupEntry.c_str(), E->sourcesEntry.c_str());
+ if (T->find("legacy") == std::string::npos)
+ _error->Warning(_("Target %s (%s) is configured multiple times in %s and %s"),
+ T->c_str(), MetaKey.c_str(), dupEntry.c_str(), E->sourcesEntry.c_str());
if (tplMetaKey.find(BreakPoint) == std::string::npos)
break;
continue;