summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2022-05-06 16:20:52 +0000
committerJulian Andres Klode <jak@debian.org>2022-05-06 16:20:52 +0000
commit97f16727b50dcaa4810e80d3c16639e0ce6a0958 (patch)
tree1228c44118015b13b2f94177571c6780eb861a7e /apt-pkg/acquire-item.cc
parent6778e2d672d84c962a578f6de415c666b9cf6ee1 (diff)
parent05fae6fae95d8ef6690f3d56863e3bb6a44d424c (diff)
Merge branch 'fix/tagfilekeys' into 'main'
Consistently dealing with fields via pkgTagSection::Key See merge request apt-team/apt!233
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index f9362b0d5..d9e1e516b 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -2371,13 +2371,13 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/
{
std::string tagname = *type;
tagname.append("-Current");
- std::string const tmp = Tags.FindS(tagname.c_str());
+ auto const tmp = Tags.Find(tagname);
if (tmp.empty() == true)
continue;
string hash;
unsigned long long size;
- std::stringstream ss(tmp);
+ std::stringstream ss(tmp.to_string());
ss.imbue(posix);
ss >> hash >> size;
if (unlikely(hash.empty() == true))
@@ -2441,13 +2441,13 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/
std::string tagname = *type;
tagname.append("-History");
- std::string const tmp = Tags.FindS(tagname.c_str());
+ auto const tmp = Tags.Find(tagname);
if (tmp.empty() == true)
continue;
string hash, filename;
unsigned long long size;
- std::stringstream ss(tmp);
+ std::stringstream ss(tmp.to_string());
ss.imbue(posix);
while (ss >> hash >> size >> filename)
@@ -2498,13 +2498,13 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/
std::string tagname = *type;
tagname.append("-Patches");
- std::string const tmp = Tags.FindS(tagname.c_str());
+ auto const tmp = Tags.Find(tagname);
if (tmp.empty() == true)
continue;
string hash, filename;
unsigned long long size;
- std::stringstream ss(tmp);
+ std::stringstream ss(tmp.to_string());
ss.imbue(posix);
while (ss >> hash >> size >> filename)
@@ -2536,13 +2536,13 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/
{
std::string tagname = *type;
tagname.append("-Download");
- std::string const tmp = Tags.FindS(tagname.c_str());
+ auto const tmp = Tags.Find(tagname);
if (tmp.empty() == true)
continue;
string hash, filename;
unsigned long long size;
- std::stringstream ss(tmp);
+ std::stringstream ss(tmp.to_string());
ss.imbue(posix);
// FIXME: all of pdiff supports only .gz compressed patches
@@ -2613,7 +2613,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/
if (pdiff_merge == true)
{
// reprepro and dak add this flag if they merge patches on the server
- std::string const precedence = Tags.FindS("X-Patch-Precedence");
+ auto const precedence = Tags.Find("X-Patch-Precedence");
pdiff_merge = (precedence != "merged");
}