GNU bug report logs - #61322
[PATCH] status: Print a hint when a 'package-cache' hook fails to build.

Previous Next

Package: guix-patches;

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

Date: Mon, 6 Feb 2023 14:15:02 UTC

Severity: normal

Tags: patch

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: zimoun <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>, 61322 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#61322] [PATCH] status: Print a hint when a 'package-cache' hook fails to build.
Date: Tue, 07 Feb 2023 12:56:05 +0100
Hi,

On Mon, 06 Feb 2023 at 15:13, Ludovic Courtès <ludo <at> gnu.org> wrote:
> * guix/channels.scm (package-cache-file): Add 'channels' to the #:properties
> list.
> * guix/status.scm (print-build-event): Upon failure, display a hint when
> the derivation is a 'package-cache' hook.

Cool!  A minor comment.

> In this case the relevant bit in the build log is:
>
> --8<---------------cut here---------------start------------->8---
> In inria/hiepacs.scm:
>    879:41  3 (inputs #<package pastix-nopython-notest <at> 6.0.3 inria/hi?>)
> In ice-9/boot-9.scm:
>   1685:16  2 (raise-exception _ #:continuable? _)
>   1780:13  1 (_ #<&compound-exception components: (#<&undefined-vari?>)
> In unknown file:
>            0 (backtrace #<undefined>)
>
> (exception unbound-variable (value #f) (value "Unbound variable: ~S") (value (python2-numpy)) (value #f))
> --8<---------------cut here---------------end--------------->8---

[...]

> +     (let ((properties (and=> (false-if-exception
> +                               (read-derivation-from-file drv))
> +                              derivation-properties)))
> +       (when (and (pair? properties)
> +                  (eq? (assq-ref properties 'type) 'profile-hook)
> +                  (eq? (assq-ref properties 'hook) 'package-cache))
> +         (display-hint (format #f (G_ "This usually indicates a bug in one of
> +the channels you are pulling from, or some incompatibility among them.  You
> +can check the build log and report the issue to the channel developers.
> +
> +The channels you are pulling from are: ~a.")
> +                               (string-join
> +                                (map symbol->string
> +                                     (or (assq-ref properties 'channels)
> +                                         '(guix))))))))

Would it be possible to also detect and also display the unbound
variable, e.g., python2-numpy?


Cheers,
simon




This bug report was last modified 2 years and 102 days ago.

Previous Next


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