unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: package systems, before and after the core-updates merge
Date: Sat, 19 Oct 2019 23:02:21 +0200	[thread overview]
Message-ID: <87r238sb36.fsf@gnu.org> (raw)
In-Reply-To: <87sgnrqf62.fsf@cbaines.net> (Christopher Baines's message of "Thu, 17 Oct 2019 21:40:21 +0100")

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

Hi,

Christopher Baines <mail@cbaines.net> skribis:

> One thing that I was aware of before the recent core-updates merge was
> that the Guix Data Service [1] didn't generate derivations for systems
> other than x86_64-linux and i686-linux, at least to the same extent as
> the master branch before the recent core-updates merge.

Indeed, see this bug fix that landed before the merge:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=bc60349b5bc58a0b803df5adce1de6db82453744

> I think this is down to the use of package-transitive-supported-systems
> within the Guix Data Service, but the output of this function for a
> package can also be seen by running guix package --show.

The patch below fixes ‘guix show’ but it has a noticeable performance
impact that makes me thing something’s not quite right with memoization
in ‘package-transitive-supported-systems’:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 660 bytes --]

diff --git a/guix/ui.scm b/guix/ui.scm
index 3e4bd5787e..426e517b54 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1259,7 +1259,8 @@ WIDTH columns.  EXTRA-FIELDS is a list of symbol/value pairs to emit."
   (format port "version: ~a~%" (package-version p))
   (format port "outputs: ~a~%" (string-join (package-outputs p)))
   (format port "systems: ~a~%"
-          (string-join (package-transitive-supported-systems p)))
+          (string-join (filter (cut supported-package? p <>)
+                               %supported-systems)))
   (format port "dependencies: ~a~%"
           (match (package-direct-inputs p)
             (((labels inputs . _) ...)

[-- Attachment #3: Type: text/plain, Size: 363 bytes --]


> Also, for the Guix Data Service, all I want to know is for a given
> package, is for which systems and targets a derivation can be reasonably
> computed. Maybe it is wrong to use package-transitive-supported-systems
> for this.

You can use ‘supported-package?’ as above.  This is also what (gnu ci)
does.

Let me know if this helps!

Ludo’.

  reply	other threads:[~2019-10-19 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 20:40 package systems, before and after the core-updates merge Christopher Baines
2019-10-19 21:02 ` Ludovic Courtès [this message]
2019-11-19 16:39   ` zimoun

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=87r238sb36.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mail@cbaines.net \
    /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).