aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/nar-info.cc
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-06-22 13:08:11 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2020-06-22 13:08:11 -0400
commit66a62b3189c8c9b0965850e6b3c9b0fda0b50fd8 (patch)
tree70a25a2cb1973a05559eca3134979fc8be873aca /src/libstore/nar-info.cc
parentf2a6cee334255ced72a70f527cf3c283b4586e42 (diff)
parent965b80347e97169f266466603e29a57359c4083c (diff)
Merge remote-tracking branch 'origin/master' into substitute-other-storedir
Diffstat (limited to 'src/libstore/nar-info.cc')
-rw-r--r--src/libstore/nar-info.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc
index bb4448c90..04550ed97 100644
--- a/src/libstore/nar-info.cc
+++ b/src/libstore/nar-info.cc
@@ -67,8 +67,9 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
else if (name == "Sig")
sigs.insert(value);
else if (name == "CA") {
- if (!ca.empty()) corrupt();
- ca = value;
+ if (ca) corrupt();
+ // FIXME: allow blank ca or require skipping field?
+ ca = parseContentAddressOpt(value);
}
pos = eol + 1;
@@ -104,8 +105,8 @@ std::string NarInfo::to_string(const Store & store) const
for (auto sig : sigs)
res += "Sig: " + sig + "\n";
- if (!ca.empty())
- res += "CA: " + ca + "\n";
+ if (ca)
+ res += "CA: " + renderContentAddress(*ca) + "\n";
return res;
}