From e81c09edbf6b352ec96668be35a68037df2f6342 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 16 Sep 2011 11:31:00 +0000 Subject: [PATCH] Remove the current output metadata from the string for unsaveDiscardOutputDependency --- src/libexpr/primops.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index a752b9a596..d5e1ce7be9 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -974,7 +974,14 @@ static void prim_unsafeDiscardOutputDependency(EvalState & state, Value * * args PathSet context2; foreach (PathSet::iterator, i, context) { Path p = *i; - if (p.at(0) == '=') p = "~" + string(p, 1); + if (p.at(0) == '=') + { + size_t index; + p = "~" + string(p, 1); + index = p.find("="); + if (index < p.find("/")) + p = "~" + string(p, index + 1); + } context2.insert(p); }