lix/src
Eelco Dolstra 49009573bc Don't interpret strings as format strings
Ludo reported this error:

  unexpected Nix daemon error: boost::too_few_args: format-string refered to more arguments than were passed

coming from this line:

  printMsg(lvlError, run.program + ": " + string(err, 0, p));

The problem here is that the string ends up implicitly converted to a
Boost format() object, so % characters are treated specially.  I
always assumed (wrongly) that strings are converted to a format object
that outputs the string as-is.

Since this assumption appears in several places that may be hard to
grep for, I've added some C++ type hackery to ensures that the right
thing happens.  So you don't have to worry about % in statements like

  printMsg(lvlError, "foo: " + s);

or

  throw Error("foo: " + s);
2014-03-28 16:59:26 +01:00
..
boost Remove Automakefiles 2014-02-01 13:54:38 +01:00
bsdiff-4.3 Fix "make dist" 2014-02-01 14:38:12 +01:00
download-via-ssh Simplify getting use-ssh-substituter from untrusted users 2014-02-26 13:58:46 +01:00
libexpr The expr of AttrNames/DynamicAttrDefs is always an ExprConcatStrings 2014-03-10 10:14:50 +01:00
libmain nix-store --gc --max-freed: Support a unit specifier 2014-02-17 14:48:50 +01:00
libstore Make /dev/kvm optional 2014-03-21 17:27:19 +01:00
libutil Don't interpret strings as format strings 2014-03-28 16:59:26 +01:00
nix-daemon Fix tabs 2014-03-18 23:23:55 +01:00
nix-env Fix passing meta attribute to buildenv.nix 2014-03-11 17:34:02 +01:00
nix-hash Remove Automakefiles 2014-02-01 13:54:38 +01:00
nix-instantiate nix-instantiate: Allow --dry-run as a synonym for --readonly-mode 2014-02-19 16:46:33 +01:00
nix-log2xml Remove Automakefiles 2014-02-01 13:54:38 +01:00
nix-store nix-store -r: Respect --add-root for non-derivations 2014-02-26 16:32:46 +01:00