From 766f7084188d8c0dd0595bbbfc50fbc4f9d67a50 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 27 Aug 2010 13:18:13 +0000 Subject: * Experimental feature: allow a derivation to tell the build hook that it requires a certain feature on the build machine, e.g. requiredSystemFeatures = [ "kvm" ]; We need this in Hydra to make sure that builds that require KVM support are forwarded to machines that have KVM support. Probably this should also be enforced for local builds. --- src/libutil/util.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/libutil/util.cc') diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 9540720fe240..2d26fc66dafe 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -966,6 +966,17 @@ Strings tokenizeString(const string & s, const string & separators) } +string concatStringsSep(const string & sep, const Strings & ss) +{ + string s; + foreach (Strings::const_iterator, i, ss) { + if (s.size() != 0) s += sep; + s += *i; + } + return s; +} + + string statusToString(int status) { if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { -- cgit 1.4.1