summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-05-06 22:23:45 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-06-11 14:45:55 +0200
commitab94ebe064bf751de73a11398b1af5589ab8c668 (patch)
tree55119ebcee47b96a404123c39df216fd2176d945 /apt-pkg/deb/deblistparser.cc
parentfc7d9b53f201bfdc5b3955394e6609ed7dadd258 (diff)
Merge the ParseDepends functions
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc40
1 files changed, 5 insertions, 35 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 80ca10e37..832e3948d 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -546,28 +546,6 @@ const char *debListParser::ConvertRelation(const char *I,unsigned int &Op)
/* This parses the dependency elements out of a standard string in place,
bit by bit. */
const char *debListParser::ParseDepends(const char *Start,const char *Stop,
- std::string &Package,std::string &Ver,unsigned int &Op)
- { return ParseDepends(Start, Stop, Package, Ver, Op, false, true, false); }
-const char *debListParser::ParseDepends(const char *Start,const char *Stop,
- std::string &Package,std::string &Ver,unsigned int &Op,
- bool const &ParseArchFlags)
- { return ParseDepends(Start, Stop, Package, Ver, Op, ParseArchFlags, true, false); }
-const char *debListParser::ParseDepends(const char *Start,const char *Stop,
- std::string &Package,std::string &Ver,unsigned int &Op,
- bool const &ParseArchFlags, bool const &StripMultiArch)
- { return ParseDepends(Start, Stop, Package, Ver, Op, ParseArchFlags, StripMultiArch, false); }
-const char *debListParser::ParseDepends(const char *Start,const char *Stop,
- string &Package,string &Ver,
- unsigned int &Op, bool const &ParseArchFlags,
- bool const &StripMultiArch,
- bool const &ParseRestrictionsList)
-{
- return debListParser::ParseDepends(Start, Stop, Package, Ver, Op, ParseArchFlags,
- StripMultiArch, ParseRestrictionsList,
- _config->Find("APT::Architecture"));
-}
-
-const char *debListParser::ParseDepends(const char *Start,const char *Stop,
string &Package,string &Ver,
unsigned int &Op, bool const &ParseArchFlags,
bool const &StripMultiArch,
@@ -584,23 +562,15 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
return res;
}
-const char *debListParser::ParseDepends(const char *Start,const char *Stop,
- StringView &Package,StringView &Ver,
- unsigned int &Op, bool ParseArchFlags,
- bool StripMultiArch,
- bool ParseRestrictionsList)
-{
- return debListParser::ParseDepends(Start, Stop, Package, Ver, Op, ParseArchFlags,
- StripMultiArch, ParseRestrictionsList,
- _config->Find("APT::Architecture"));
-}
-const char *debListParser::ParseDepends(const char *Start,const char *Stop,
- StringView &Package,StringView &Ver,
+const char *debListParser::ParseDepends(const char *Start, const char *Stop,
+ StringView &Package, StringView &Ver,
unsigned int &Op, bool ParseArchFlags,
bool StripMultiArch,
- bool ParseRestrictionsList, string const &Arch)
+ bool ParseRestrictionsList, string Arch)
{
+ if (Arch.empty())
+ Arch = _config->Find("APT::Architecture");
// Strip off leading space
for (;Start != Stop && isspace_ascii(*Start) != 0; ++Start);