diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-11-29 00:23:26 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-11-29 00:23:26 +0100 |
commit | 41c81fd85d43ed747375d8f1ee7a9b71fb3c7016 (patch) | |
tree | f975f84ddd0c5664523dfbb33b0cf9748f42b177 /apt-pkg/deb/deblistparser.cc | |
parent | 9c562bc9357c1e5bf566110fe30265dcdfd815fd (diff) |
Ignore :qualifiers after package name in build dependencies
for now as long we don't understand them (Closes: #558103)
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r-- | apt-pkg/deb/deblistparser.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 16e6ee332..25a1df3f9 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -395,7 +395,8 @@ const char *debListParser::ConvertRelation(const char *I,unsigned int &Op) bit by bit. */ const char *debListParser::ParseDepends(const char *Start,const char *Stop, string &Package,string &Ver, - unsigned int &Op, bool ParseArchFlags) + unsigned int &Op, bool const &ParseArchFlags, + bool const &StripMultiArch) { // Strip off leading space for (;Start != Stop && isspace(*Start) != 0; Start++); @@ -414,7 +415,14 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop, // Stash the package name Package.assign(Start,I - Start); - + + // We don't want to confuse library users which can't handle MultiArch + if (StripMultiArch == true) { + size_t const found = Package.rfind(':'); + if (found != string::npos) + Package = Package.substr(0,found); + } + // Skip white space to the '(' for (;I != Stop && isspace(*I) != 0 ; I++); |