GNU bug report logs - #59071
guix home does not respect package outputs

Previous Next

Package: guix;

Reported by: pronaip <at> riseup.net

Date: Sun, 6 Nov 2022 08:37:01 UTC

Severity: normal

Tags: notabug

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59071 in the body.
You can then email your comments to 59071 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#59071; Package guix. (Sun, 06 Nov 2022 08:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to pronaip <at> riseup.net:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 06 Nov 2022 08:37:02 GMT) Full text and rfc822 format available.

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

From: pronaip <at> riseup.net
To: Bug reports for GNU Guix <bug-guix <at> gnu.org>
Subject: guix home does not respect package outputs
Date: Sun, 06 Nov 2022 01:18:02 +0100
Package outputs are apparently tricky, people seem to tend to forget
they exist.  This is another case of that.

This should be a good enough reproducer:
```
(home-environment
  (packages
    (map specification->package+output
      (list "glib:bin"
            ...)))
  ...)
```
If you look at guix home describe --list-installed you'll see that all
the lines say "out" for the package output.

For a while I didn't notice this even though it **should** have broken
transmission:gui when I migrated my home config to guix home, but it
seems like the default profile did not get deleted.  This is actually
pretty confusing because guix package still continues to work and it's
not clear if there is a precendence between it and guix home and what
that precedence might be.  But that's for another bug report.




Information forwarded to bug-guix <at> gnu.org:
bug#59071; Package guix. (Thu, 10 Nov 2022 09:55:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: pronaip <at> riseup.net
Cc: 59071 <at> debbugs.gnu.org
Subject: Re: bug#59071: guix home does not respect package outputs
Date: Thu, 10 Nov 2022 10:54:13 +0100
Hi,

pronaip <at> riseup.net skribis:

> This should be a good enough reproducer:
>
> ```
> (home-environment
>   (packages
>     (map specification->package+output
>       (list "glib:bin"
>             ...)))
>   ...)
> ```

‘specification->package+output’ returns two values:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (specification->package+output "glib:bin")
$38 = #<package glib <at> 2.73.3 gnu/packages/glib.scm:445 7f0988d69b00>
$39 = "bin"
--8<---------------cut here---------------end--------------->8---

However, ‘map’ expects its first argument to return one value and thus
discards additional values:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (map specification->package+output '("glib:bin"))
$40 = (#<package glib <at> 2.73.3 gnu/packages/glib.scm:445 7f0988d69b00>)
--8<---------------cut here---------------end--------------->8---

Instead, you have to write ‘specifications->packages’:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (specifications->packages '("glib:bin" "inkscape"))
$42 = ((#<package glib <at> 2.73.3 gnu/packages/glib.scm:445 7f0988d69b00> "bin") (#<package inkscape <at> 1.2.1 gnu/packages/inkscape.scm:244 7f097cf246e0> "out"))
--8<---------------cut here---------------end--------------->8---

That’s what ‘guix home import’ does now, but I noticed it’s not
documented so I’ll add it to the manual.

Thanks,
Ludo’.




Added tag(s) notabug. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 10 Nov 2022 09:55:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 59071 <at> debbugs.gnu.org and pronaip <at> riseup.net Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 10 Nov 2022 09:55:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 08 Dec 2022 12:24:11 GMT) Full text and rfc822 format available.

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

Previous Next


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