Skip to content
Snippets Groups Projects
  1. Mar 29, 2014
  2. Mar 28, 2014
    • Eelco Dolstra's avatar
      Don't interpret strings as format strings · 49009573
      Eelco Dolstra authored
      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);
      49009573
  3. Mar 21, 2014
    • Ludovic Courtès's avatar
      Make /dev/kvm optional · 24cb65ef
      Ludovic Courtès authored
      The daemon now creates /dev deterministically (thanks!).  However, it
      expects /dev/kvm to be present.
      
      The patch below restricts that requirement (1) to Linux-based systems,
      and (2) to systems where /dev/kvm already exists.
      
      I’m not sure about the way to handle (2).  We could special-case
      /dev/kvm and create it (instead of bind-mounting it) in the chroot, so
      it’s always available; however, it wouldn’t help much since most likely,
      if /dev/kvm missing, then KVM support is missing.
      24cb65ef
  4. Mar 18, 2014
    • Eelco Dolstra's avatar
      Fix tabs · 3fc05692
      Eelco Dolstra authored
      3fc05692
    • Ludovic Courtès's avatar
      Allow recovery from isValidPath RPCs with an invalid path · 51800e06
      Ludovic Courtès authored
      Currently, clients cannot recover from an isValidPath RPC with an
      invalid path parameter because the daemon closes the connection when
      that happens.
      
      More precisely:
      
        1. in performOp, wopIsValidPath case, ‘readStorePath’ raises an
           ‘Error’ exception;
      
        2. that exception is caught by the handler in ‘processConnection’;
      
        3. the handler determines errorAllowed == false, and thus exits after
           sending the message.
      
      This last part is fixed by calling ‘startWork’ early on, as in the patch
      below.
      
      The same reasoning could be applied to all the RPCs that take one or
      more store paths as inputs, but isValidPath is, by definition, likely to
      be passed invalid paths in the first place, so it’s important for this
      one to allow recovery.
      51800e06
  5. Mar 17, 2014
  6. Mar 12, 2014
  7. Mar 11, 2014
  8. Mar 10, 2014
  9. Mar 05, 2014
  10. Feb 28, 2014
  11. Feb 27, 2014
  12. Feb 26, 2014
Loading