diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-18 21:58:27 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-18 22:11:19 +0000 |
commit | bbbf3602a323538b8da38f1a2c7ce136a20f74c6 (patch) | |
tree | e783d838d8a75d854e0b72eea03784c5909040bc /src/libstore/nar-info.cc | |
parent | 406dbb7fce32f7d80b02f560d91c956698b58d6e (diff) | |
parent | 40526fbea56a8006eb7f1758d461a5acbe9a1694 (diff) |
Merge branch 'enum-class' into no-hash-type-unknown
Diffstat (limited to 'src/libstore/nar-info.cc')
-rw-r--r-- | src/libstore/nar-info.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc index a35886302..ade132d58 100644 --- a/src/libstore/nar-info.cc +++ b/src/libstore/nar-info.cc @@ -4,10 +4,10 @@ namespace nix { NarInfo::NarInfo(const Store & store, const std::string & s, const std::string & whence) - : ValidPathInfo(StorePath::dummy.clone()) // FIXME: hack + : ValidPathInfo(StorePath(StorePath::dummy)) // FIXME: hack { auto corrupt = [&]() { - throw Error(format("NAR info file '%1%' is corrupt") % whence); + throw Error("NAR info file '%1%' is corrupt", whence); }; auto parseHashField = [&](const string & s) { @@ -56,11 +56,11 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string & auto refs = tokenizeString<Strings>(value, " "); if (!references.empty()) corrupt(); for (auto & r : refs) - references.insert(StorePath::fromBaseName(r)); + references.insert(StorePath(r)); } else if (name == "Deriver") { if (value != "unknown-deriver") - deriver = StorePath::fromBaseName(value); + deriver = StorePath(value); } else if (name == "System") system = value; @@ -87,10 +87,10 @@ std::string NarInfo::to_string(const Store & store) const assert(compression != ""); res += "Compression: " + compression + "\n"; assert(fileHash.type == HashType::SHA256); - res += "FileHash: " + fileHash.to_string(Base::Base32) + "\n"; + res += "FileHash: " + fileHash.to_string(Base::Base32, true) + "\n"; res += "FileSize: " + std::to_string(fileSize) + "\n"; assert(narHash.type == HashType::SHA256); - res += "NarHash: " + narHash.to_string(Base::Base32) + "\n"; + res += "NarHash: " + narHash.to_string(Base::Base32, true) + "\n"; res += "NarSize: " + std::to_string(narSize) + "\n"; res += "References: " + concatStringsSep(" ", shortRefs()) + "\n"; |