On Mon, 30 Oct 2023 14:01:44 +0100 felix.winkelm...@bevuta.com wrote:

>> That was it. Thanks. I do have to keep running:
>> 
>> find /software/ -name \*.egg-info -empty -delete -print
>> 
>> as check-errors.egg-info seems to be a pervasive problem. Maybe it would be
>> worth it to add a defence against this?
>
> Sorry - wrong patch, this is the right one.
>
>
> felix
>
>
> From 8a2a82a8171744546badacaa297bcf754bff3eba Mon Sep 17 00:00:00 2001
> From: felix <fe...@call-with-current-continuation.org>
> Date: Mon, 30 Oct 2023 14:00:41 +0100
> Subject: [PATCH] handle case when egg-info file is empty
>
> ---
>  egg-information.scm | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/egg-information.scm b/egg-information.scm
> index 6f5f7cb9..1e7f8aec 100644
> --- a/egg-information.scm
> +++ b/egg-information.scm
> @@ -34,8 +34,11 @@
>      (if (file-exists? fname*) fname* fname)))
>  
>  (define (load-egg-info fname)
> -  (let ((fname (locate-egg-file fname)))
> -    (with-input-from-file fname read)))
> +  (let* ((fname (locate-egg-file fname))
> +         (info (with-input-from-file fname read)))
> +    (if (eof-object? info)
> +        (error "empty egg-info file, possibly due to an aborted egg-install 
> - please remove the file and retry" fname)
> +        info)))

How about
"empty egg-info file, possibly due to an aborted egg-install - please remove 
the file and reinstall the corresponding egg"?

Rationale: Matt's case.  check-errors.egg-info was empty, but the
installation of base64 was failing.  If Matt had removed
check-errors.egg-info and retried installing base64, the installation of
base64 would work, but check-errors would still be broken
(chicken-status and chicken-uninstall would ignore it, for example).

All the best.
Mario
-- 
http://parenteses.org/mario

Reply via email to