guix-patches
[Top][All Lists]
Advanced

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

[bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages t


From: zimoun
Subject: [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'.
Date: Fri, 01 Oct 2021 16:16:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi,

Thanks for 50620.  However, because the package guix had not been
updated in the same time – see [2/2] of 50620 – it makes convoluted to
avoid:

--8<---------------cut here---------------start------------->8---
ERROR: In procedure %resolve-variable:
error: computed-origin-method: unbound variable
--8<---------------cut here---------------end--------------->8---

The package guix supports the previous location and as soon as it will
be updated the new location will be effective.  Because I am not
convinced that people (at least me) will track that; to make it work
with both locations means something along these lines:

--8<---------------cut here---------------start------------->8---
  (define computed-origin-method?
    (catch #t
      (lambda _
        (define computed-origin-method
          (@@ (guix packages) computed-origin-method))
        (lambda (method)
          (eq? method computed-origin-method)))
      (lambda _
        (lambda (method)
          (or (eq? method (@@ (gnu packages linux) computed-origin-method))
              (eq? method (@@ (gnu packages gnuzilla) 
computed-origin-method)))))))

  (if (computed-origin-method? method)
      ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm
      ;; represent their 'uri' as 'promise'.
      (match uri
        ((? promise? promise)

[...]

      ;;Regular packages represent 'uri' as string.
      `((type . ,(cond ((or (eq? url-fetch method)
[...]
--8<---------------cut here---------------end--------------->8---

Update the package guix reduces to just:

--8<---------------cut here---------------start------------->8---
  (if (eq? method (@@ (guix packages) computed-origin-method))
      ;; Packages in gnu/packages/gnuzilla.scm and gnu/packages/linux.scm
      ;; represent their 'uri' as 'promise'.
      (match uri
        ((? promise? promise)

[...]

      ;;Regular packages represent 'uri' as string.
      `((type . ,(cond ((or (eq? url-fetch method)
[...]
--8<---------------cut here---------------end--------------->8---

which had been the original aim of 50620.

Could you please update the package guix?  See [2/2] of 50620. :-)

Or do I miss something?

Cheers,
simon





reply via email to

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