unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>, 61322@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@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	[thread overview]
Message-ID: <86mt5pn0yy.fsf@gmail.com> (raw)
In-Reply-To: <20230206141352.29287-1-ludo@gnu.org>

Hi,

On Mon, 06 Feb 2023 at 15:13, Ludovic Courtès <ludo@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@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




  reply	other threads:[~2023-02-07 12:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06 14:13 [bug#61322] [PATCH] status: Print a hint when a 'package-cache' hook fails to build Ludovic Courtès
2023-02-07 11:56 ` zimoun [this message]
2023-02-10 23:13   ` bug#61322: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86mt5pn0yy.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=61322@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).