1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00

Mark content-addressed paths in the Nix database and in .narinfo

This allows such paths to be imported without signatures.
This commit is contained in:
Eelco Dolstra 2016-08-03 13:17:11 +02:00
parent 36a51ecab3
commit d961c29c9c
11 changed files with 146 additions and 43 deletions

View file

@ -67,6 +67,10 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
system = value;
else if (name == "Sig")
sigs.insert(value);
else if (name == "CA") {
if (!ca.empty()) corrupt();
ca = value;
}
pos = eol + 1;
}
@ -101,6 +105,9 @@ std::string NarInfo::to_string() const
for (auto sig : sigs)
res += "Sig: " + sig + "\n";
if (!ca.empty())
res += "CA: " + ca + "\n";
return res;
}