about summary refs log tree commit diff
path: root/src/nix
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/nix
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/nix')
-rw-r--r--src/nix/path-info.cc1
-rw-r--r--src/nix/verify.cc6
2 files changed, 6 insertions, 1 deletions
diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc
index c61fe7ff1e00..dca22240b1cb 100644
--- a/src/nix/path-info.cc
+++ b/src/nix/path-info.cc
@@ -73,6 +73,7 @@ struct CmdPathInfo : StorePathsCommand
                 std::cout << '\t';
                 Strings ss;
                 if (info->ultimate) ss.push_back("ultimate");
+                if (info->ca != "") ss.push_back("ca:" + info->ca);
                 for (auto & sig : info->sigs) ss.push_back(sig);
                 std::cout << concatStringsSep(" ", ss);
             }
diff --git a/src/nix/verify.cc b/src/nix/verify.cc
index fd904f465687..f2b6acdfbf0b 100644
--- a/src/nix/verify.cc
+++ b/src/nix/verify.cc
@@ -116,12 +116,16 @@ struct CmdVerify : StorePathsCommand
                             }
                         };
 
+                        if (info->isContentAddressed(*store)) validSigs = ValidPathInfo::maxSigs;
+
                         doSigs(info->sigs);
 
                         for (auto & store2 : substituters) {
                             if (validSigs >= actualSigsNeeded) break;
                             try {
-                                doSigs(store2->queryPathInfo(info->path)->sigs);
+                                auto info2 = store2->queryPathInfo(info->path);
+                                if (info2->isContentAddressed(*store)) validSigs = ValidPathInfo::maxSigs;
+                                doSigs(info2->sigs);
                             } catch (InvalidPath &) {
                             } catch (Error & e) {
                                 printMsg(lvlError, format(ANSI_RED "error:" ANSI_NORMAL " %s") % e.what());