guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61322: [PATCH] status: Print a hint when a 'package-cache' hook fail


From: Ludovic Courtès
Subject: bug#61322: [PATCH] status: Print a hint when a 'package-cache' hook fails to build.
Date: Sat, 11 Feb 2023 00:13:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hello!

zimoun <zimon.toutoune@gmail.com> skribis:

>> 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?

Nope.  As I wrote, I agree it would be nicer, but I don’t see how we
could reliably “extract” the actual error from the build log.

Pushed as 3ab8559436356ef89aa60135d3558681d64443ae.

Thanks for taking a look!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]