GNU bug report logs - #51983
guix build: error: integer expected from stream

Previous Next

Package: guix;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Fri, 19 Nov 2021 20:54:01 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 51983 <at> debbugs.gnu.org
Subject: bug#51983: guix build: error: integer expected from stream
Date: Wed, 24 Nov 2021 14:52:14 -0500
Hello Tobias!

Tobias Geerinckx-Rice <me <at> tobias.gr> writes:

> Guix,
>
> I saw this reported by jlicht on #guix but I'm pretty sure that 
> it's been reported a few times.
>
> Here's the error, with channel:
>
> (channel
>   (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git")
>   (branch "core-updates-frozen")
>   (introduction
>     (make-channel-introduction
>      "9edb3f66fd807b096b48283debdcddccfea34bad"
>      (openpgp-fingerprint
>       "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
>
> And patch:
>
> From: Tobias Geerinckx-Rice <me <at> tobias.gr>
> Date: Fri, 19 Nov 2021 17:37:44 +0100
> Subject: [PATCH] daemon: Print the line whence we expect an 
> integer.
>
> * nix/libstore/local-store.cc 
>   (LocalStore::getLineFromSubstituter):
> Include the malformed substituter stream line in the error 
> message.
>
> ---
>  nix/libstore/local-store.cc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/nix/libstore/local-store.cc 
> b/nix/libstore/local-store.cc
> index 675d1ba66f..83b6681122 100644
> --- a/nix/libstore/local-store.cc
> +++ b/nix/libstore/local-store.cc
> @@ -839,7 +839,8 @@ template<class T> T 
> LocalStore::getIntLineFromSubstituter(Agent & run)
>  {
>      string s = getLineFromSubstituter(run);
>      T res;
> -    if (!string2Int(s, res)) throw Error("integer expected from 
>      stream");
> +    if (!string2Int(s, res))
> +        throw Error(format("integer expected from stream: %1%") % 
> s);
>      return res;
>  }

I just stumbled on this.

LGTM!

Maxim




This bug report was last modified 3 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.