GNU bug report logs - #67048
guix refresh -u -L does not work with relative path

Previous Next

Package: guix;

Reported by: Andreas Enge <andreas <at> enge.fr>

Date: Fri, 10 Nov 2023 17:13:01 UTC

Severity: normal

Full log


Message #17 received at 67048 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Andreas Enge <andreas <at> enge.fr>, 67048 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#67048: guix refresh -u -L does not work with relative path
Date: Tue, 14 Nov 2023 18:52:53 +0100
Hi,

On Mon, 13 Nov 2023 at 19:28, Simon Tournier <zimon.toutoune <at> gmail.com> wrote:

>>    guix refresh -u -L proj python-numpy-illustrated
>> yields the error
>> proj/example.scm:10:2: python-numpy-illustrated: updating from version 0.3 to version 0.3.1...
>> proj/example.scm:10:2: warning: python-numpy-illustrated: no `version' field in source; skipping

As mentioned in [1], the issue is from ’search-path’ – it returns #false
– it is involved in several layers.

See <https://issues.guix.gnu.org/67048#3> for a patch proposal.


Some details: When invoking “guix refresh” (guix scripts refresh):

 + It calls the procedure ’update-package’

  + which calls ’update-package-source’; see guix/upstream.scm

    + which calls ’package-field-location’; see guix/package.scm

     (match (search-path %load-path file)
       ((? string? file-found)
[...]
       (#f
        ;; FILE could not be found in %LOAD-PATH.
        #f)))

  -> Therefore in ’update-package-source’, the variable ’version-loc’ is
     false:

            (version-loc (package-field-location package 'version)))
        (if version-loc

  + Once fixed, later in ’update-package-source’, it reads,

               (file        (and=> (location-file loc)
                                   (cut search-path %load-path <>))))
          (if file

  -> Therefore, the variable ’file’ is false.

     + Once fixed, later in ’update-package-source’ it calls
     ’absolute-location’; see guix/diagnostics.scm.

            (if (string-prefix? "/" (location-file loc))
[...]
                (match (search-path %load-path (location-file loc))
                  (#f
                   (raise (formatted-message



Well, I do not know how to do better than
<https://issues.guix.gnu.org/67048#3>.

WDYT?

Cheers,
simon


1: bug#67048: guix refresh -u -L does not work with relative path
Simon Tournier <zimon.toutoune <at> gmail.com>
Mon, 13 Nov 2023 19:28:25 +0100
id:8734x9fqye.fsf <at> gmail.com
https://issues.guix.gnu.org/67048
https://issues.guix.gnu.org/msgid/8734x9fqye.fsf <at> gmail.com
https://yhetil.org/guix/8734x9fqye.fsf <at> gmail.com




This bug report was last modified 1 year and 214 days ago.

Previous Next


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