unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: 50515@debbugs.gnu.org, ludo@gnu.org
Subject: [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json'.
Date: Fri, 01 Oct 2021 16:16:16 +0200	[thread overview]
Message-ID: <86wnmwakzz.fsf@gmail.com> (raw)
In-Reply-To: <20210911002608.14074-2-zimon.toutoune@gmail.com> (zimoun's message of "Sat, 11 Sep 2021 02:26:08 +0200")

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	other threads:[~2021-10-01 14:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11  0:14 [bug#50515] (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json' zimoun
2021-09-11  0:26 ` [bug#50515] [PATCH 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL' zimoun
2021-09-11  0:26   ` [bug#50515] [PATCH 2/2] website: Add 'computed-origin-method' packages to 'sources.json' zimoun
2021-10-01 14:16     ` zimoun [this message]
2021-10-04  7:53       ` Ludovic Courtès
2021-10-05 14:09         ` zimoun
2021-09-12  0:54   ` Mark H Weaver
2021-09-13  7:01     ` zimoun
2021-09-16  0:07       ` Mark H Weaver
2021-09-16 11:48         ` zimoun
2021-10-05 14:09 ` [bug#50515] [PATCH v2 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL' zimoun
2021-10-05 14:09   ` [bug#50515] [PATCH v2 2/2] website: Add 'computed-origin-method' packages to 'sources.json' zimoun
2021-10-18 12:23     ` [bug#50515] (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json' Ludovic Courtès
2021-10-21  9:42       ` zimoun
2021-10-21  9:41 ` [bug#50515] [PATCH v3 1/2] website: Tweak 'GUIX_WEB_SITE_LOCAL' zimoun
2021-10-21  9:41   ` [bug#50515] [PATCH v3 2/2] website: Add 'computed-origin-method' packages to 'sources.json' zimoun
2021-10-21 20:58   ` bug#50515: (guix-artwork)[PATCH 0/2] List linux origins in 'sources.json' 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=86wnmwakzz.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=50515@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).