aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-23 14:34:20 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-23 14:39:02 +0000
commit2274f63453dc0b5c76a50ae34d6f7c8ef329f411 (patch)
tree8da743d14bd0101c1f660e7b493fc9a794303df8 /src/libstore
parent4bfba1305ed004c7b23b4e288efa707807cf2ac3 (diff)
Get rid of `basicDerivation::findOutput`
It's a tiny function which is: - hardly worth abstrating over, and also only used once. - doesn't work once we get CA drvs I rewrote the one callsite to be forwards compatable with CA derivations, and also potentially more performant: instead of reading in the derivation it can ust consult the SQLite DB in the common case.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/derivations.cc8
-rw-r--r--src/libstore/derivations.hh4
2 files changed, 0 insertions, 12 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index f325e511a..870901421 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -7,14 +7,6 @@
namespace nix {
-const StorePath & BasicDerivation::findOutput(const string & id) const
-{
- auto i = outputs.find(id);
- if (i == outputs.end())
- throw Error("derivation has no output '%s'", id);
- return i->second.path;
-}
-
bool BasicDerivation::isBuiltin() const
{
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 68c53c1ff..00cf1bb08 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -39,10 +39,6 @@ struct BasicDerivation
BasicDerivation() { }
virtual ~BasicDerivation() { };
- /* Return the path corresponding to the output identifier `id' in
- the given derivation. */
- const StorePath & findOutput(const std::string & id) const;
-
bool isBuiltin() const;
/* Return true iff this is a fixed-output derivation. */