[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
290/376: realiseContext: Handle all context types
From: |
Ludovic Courtès |
Subject: |
290/376: realiseContext: Handle all context types |
Date: |
Wed, 28 Jan 2015 22:05:41 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 2719627bbe4001b172e1b54ca7c300593675bf3f
Author: Shea Levy <address@hidden>
Date: Sat Nov 15 21:43:51 2014 -0500
realiseContext: Handle all context types
Avoids an assertion
---
src/libexpr/primops.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 50d03f3..6203a11 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -35,7 +35,7 @@ std::pair<string, string> decodeContext(const string & s)
size_t index = s.find("!", 1);
return std::pair<string, string>(string(s, index + 1), string(s, 1,
index - 1));
} else
- return std::pair<string, string>(s, "");
+ return std::pair<string, string>(s.at(0) == '/' ? s: string(s, 1), "");
}
@@ -51,7 +51,7 @@ void realiseContext(const PathSet & context)
assert(isStorePath(ctx));
if (!store->isValidPath(ctx))
throw InvalidPathError(ctx);
- if (isDerivation(ctx))
+ if (!decoded.second.empty() && isDerivation(ctx))
drvs.insert(decoded.first + "!" + decoded.second);
}
if (!drvs.empty()) {
- 273/376: Fix more warnings, (continued)
- 273/376: Fix more warnings, Ludovic Courtès, 2015/01/28
- 258/376: Fix nix-copy-closure --from, Ludovic Courtès, 2015/01/28
- 260/376: Drop support for pre-c++11 compilers., Ludovic Courtès, 2015/01/28
- 262/376: Revert "Drop support for pre-c++11 compilers.", Ludovic Courtès, 2015/01/28
- 263/376: Fix build on gcc < 4.7, Ludovic Courtès, 2015/01/28
- 244/376: Show total allocations, Ludovic Courtès, 2015/01/28
- 293/376: Remove Hydra build product, Ludovic Courtès, 2015/01/28
- 279/376: Add a launchd configuration file to run nix-daemon, Ludovic Courtès, 2015/01/28
- 251/376: nix-channel --add: Validate URL / channel ID, Ludovic Courtès, 2015/01/28
- 252/376: Remove redundant space in usage errors, Ludovic Courtès, 2015/01/28
- 290/376: realiseContext: Handle all context types,
Ludovic Courtès <=
- 276/376: Improve error message if the daemon worker fails to start, Ludovic Courtès, 2015/01/28
- 267/376: Remove comments claiming we use a private PID namespace, Ludovic Courtès, 2015/01/28
- 237/376: Don't recompile the same regex over and over, Ludovic Courtès, 2015/01/28
- 297/376: Build Ubuntu 14.10 package, Ludovic Courtès, 2015/01/28
- 268/376: Document some primops, Ludovic Courtès, 2015/01/28
- 272/376: Shut up a clang warning, Ludovic Courtès, 2015/01/28
- 257/376: Revert "binary download: Use $NIX_CURL_FLAGS", Ludovic Courtès, 2015/01/28
- 266/376: doc: fixed nix-instantiate --find-file, Ludovic Courtès, 2015/01/28
- 282/376: download-from-binary-cache.pl: Fix flushing of stderr, Ludovic Courtès, 2015/01/28
- 256/376: Merge pull request #372 from wmertens/patch-4, Ludovic Courtès, 2015/01/28