aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-06-02 11:00:10 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-06-02 11:00:10 -0400
commita5d820a0a396db01e6297dfcadaa3218a1e918c7 (patch)
tree01ac853a7ebf045aca8bcb7125ebed671f1629e4 /src
parent1b6461f671b5ad8475c6f30f82d8fc9422746508 (diff)
Change parseCa(Opt) to parseContentAddress(Opt)
Diffstat (limited to 'src')
-rw-r--r--src/libstore/daemon.cc2
-rw-r--r--src/libstore/file-hash.cc6
-rw-r--r--src/libstore/file-hash.hh4
-rw-r--r--src/libstore/legacy-ssh-store.cc2
-rw-r--r--src/libstore/local-store.cc2
-rw-r--r--src/libstore/nar-info-disk-cache.cc2
-rw-r--r--src/libstore/nar-info.cc2
-rw-r--r--src/libstore/remote-store.cc2
-rw-r--r--src/nix-store/nix-store.cc2
9 files changed, 12 insertions, 12 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index 45bfa6753..0734f990a 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -711,7 +711,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
{
string caOptRaw;
from >> caOptRaw;
- info.ca = parseCaOpt(caOptRaw);
+ info.ca = parseContentAddressOpt(caOptRaw);
}
from >> repair >> dontCheckSigs;
if (!trusted && dontCheckSigs)
diff --git a/src/libstore/file-hash.cc b/src/libstore/file-hash.cc
index 494079c18..26153a424 100644
--- a/src/libstore/file-hash.cc
+++ b/src/libstore/file-hash.cc
@@ -38,12 +38,12 @@ std::string renderContentAddress(ContentAddress ca) {
}, ca);
}
-ContentAddress parseCa(std::string_view rawCa) {
+ContentAddress parseContentAddress(std::string_view rawCa) {
throw Error("TODO");
};
-std::optional<ContentAddress> parseCaOpt(std::string_view rawCaOpt) {
- return rawCaOpt == "" ? std::optional<ContentAddress> {} : parseCa(rawCaOpt);
+std::optional<ContentAddress> parseContentAddressOpt(std::string_view rawCaOpt) {
+ return rawCaOpt == "" ? std::optional<ContentAddress> {} : parseContentAddress(rawCaOpt);
};
std::string renderContentAddress(std::optional<ContentAddress> ca) {
diff --git a/src/libstore/file-hash.hh b/src/libstore/file-hash.hh
index 9d12f5fe7..64d514751 100644
--- a/src/libstore/file-hash.hh
+++ b/src/libstore/file-hash.hh
@@ -59,8 +59,8 @@ std::string renderContentAddress(ContentAddress ca);
std::string renderContentAddress(std::optional<ContentAddress> ca);
-ContentAddress parseCa(std::string_view rawCa);
+ContentAddress parseContentAddress(std::string_view rawCa);
-std::optional<ContentAddress> parseCaOpt(std::string_view rawCaOpt);
+std::optional<ContentAddress> parseContentAddressOpt(std::string_view rawCaOpt);
}
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc
index 8471ed073..9b6e6e6d7 100644
--- a/src/libstore/legacy-ssh-store.cc
+++ b/src/libstore/legacy-ssh-store.cc
@@ -117,7 +117,7 @@ struct LegacySSHStore : public Store
{
std::string rawCaOpt;
conn->from >> rawCaOpt;
- info->ca = parseCaOpt(rawCaOpt);
+ info->ca = parseContentAddressOpt(rawCaOpt);
}
info->sigs = readStrings<StringSet>(conn->from);
}
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index fe346f96a..2067343c7 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -662,7 +662,7 @@ void LocalStore::queryPathInfoUncached(const StorePath & path,
if (s) info->sigs = tokenizeString<StringSet>(s, " ");
s = (const char *) sqlite3_column_text(state->stmtQueryPathInfo, 7);
- if (s) info->ca = parseCaOpt(s);
+ if (s) info->ca = parseContentAddressOpt(s);
/* Get the references. */
auto useQueryReferences(state->stmtQueryReferences.use()(info->id));
diff --git a/src/libstore/nar-info-disk-cache.cc b/src/libstore/nar-info-disk-cache.cc
index b4346d4d1..def514840 100644
--- a/src/libstore/nar-info-disk-cache.cc
+++ b/src/libstore/nar-info-disk-cache.cc
@@ -203,7 +203,7 @@ public:
narInfo->deriver = StorePath::fromBaseName(queryNAR.getStr(9));
for (auto & sig : tokenizeString<Strings>(queryNAR.getStr(10), " "))
narInfo->sigs.insert(sig);
- narInfo->ca = parseCaOpt(queryNAR.getStr(11));
+ narInfo->ca = parseContentAddressOpt(queryNAR.getStr(11));
return {oValid, narInfo};
});
diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc
index 4f7c732ce..fe37d67ec 100644
--- a/src/libstore/nar-info.cc
+++ b/src/libstore/nar-info.cc
@@ -69,7 +69,7 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
else if (name == "CA") {
if (ca) corrupt();
// FIXME: allow blank ca or require skipping field?
- ca = parseCaOpt(value);
+ ca = parseContentAddressOpt(value);
}
pos = eol + 1;
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 2744245f3..6dab9dc16 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -383,7 +383,7 @@ void RemoteStore::queryPathInfoUncached(const StorePath & path,
info->sigs = readStrings<StringSet>(conn->from);
string caOptRaw;
conn->from >> caOptRaw;
- info->ca = parseCaOpt(caOptRaw);
+ info->ca = parseContentAddressOpt(caOptRaw);
}
}
callback(std::move(info));
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 64ee9fd45..5d8d04252 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -947,7 +947,7 @@ static void opServe(Strings opFlags, Strings opArgs)
{
std::string rawCA;
in >> rawCA;
- info.ca = parseCaOpt(rawCA);
+ info.ca = parseContentAddressOpt(rawCA);
}
if (info.narSize == 0)