about summary refs log tree commit diff
path: root/src/libstore/nar-info.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-03T11·17+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-10T16·05+0200
commitd961c29c9c5e806ff7c46c855a1e9d2b6cae593b (patch)
tree7ee4768690c7520871fa7165025816b781be48d3 /src/libstore/nar-info.cc
parent36a51ecab3f107be113401fbd401c5a491c5afea (diff)
Mark content-addressed paths in the Nix database and in .narinfo
This allows such paths to be imported without signatures.
Diffstat (limited to 'src/libstore/nar-info.cc')
-rw-r--r--src/libstore/nar-info.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc
index b0a8d77c2fba..201cac671a55 100644
--- a/src/libstore/nar-info.cc
+++ b/src/libstore/nar-info.cc
@@ -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;
 }