GNU bug report logs - #50501
packages->manifest can lose the desired package output

Previous Next

Package: guix;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Fri, 10 Sep 2021 09: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 50501 in the body.
You can then email your comments to 50501 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#50501; Package guix. (Fri, 10 Sep 2021 09:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 10 Sep 2021 09:37:01 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: bug-guix <at> gnu.org
Subject: packages->manifest can lose the desired package output
Date: Fri, 10 Sep 2021 12:34:21 +0300
[Message part 1 (text/plain, inline)]
I've been fighting my manifest to try to get "git" and "git:send-email"
both included, while using package transformations. For the sake of
brevity, here's a stripped down version of my manifest:

(packages->manifest
  (map specification->package+output
    '("git" "git:send-email")))

Here's what I learned from some experimentation:

(cmd)scheme@(guile-user)> (specification->package+output "git:send-email")
$14 = #<package git <at> 2.32.0 gnu/packages/version-control.scm:176 7f730e918320>
$15 = "send-email"
(ins)scheme@(guile-user)> (list (specification->package+output "git:send-email"))
$16 = (#<package git <at> 2.32.0 gnu/packages/version-control.scm:176 7f730e918320>)
(ins)scheme@(guile-user)> (list (specification->package+output "git"))
$17 = (#<package git <at> 2.32.0 gnu/packages/version-control.scm:176 7f730e918320>)

Meanwhile, (specifications->manifest '("git" "git:send-email")) does
actually return a manifest with both the "out" and the "send-email"
outputs of git.

(package->manifest-entry (specification->package+output "git:send-email"))
returns a manifest entry for "git:out" and
(package->manifest-entry git "send-email") returns a manifest entry for
"git:send-email".

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#50501; Package guix. (Fri, 10 Sep 2021 14:27:02 GMT) Full text and rfc822 format available.

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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Efraim Flashner <efraim <at> flashner.co.il>, 50501 <at> debbugs.gnu.org
Subject: Re: packages->manifest can lose the desired package output
Date: Fri, 10 Sep 2021 16:26:25 +0200
Hi Efraim,

Am Freitag, den 10.09.2021, 12:34 +0300 schrieb Efraim Flashner:
> I've been fighting my manifest to try to get "git" and "git:send-
> email" both included, while using package transformations. For the
> sake of brevity, here's a stripped down version of my manifest:
> 
> (packages->manifest
>   (map specification->package+output
>     '("git" "git:send-email")))
> 
> Here's what I learned from some experimentation:
> 
> (cmd)scheme@(guile-user)> (specification->package+output "git:send-
> email")
> $14 = #<package git <at> 2.32.0 gnu/packages/version-control.scm:176
> 7f730e918320>
> $15 = "send-email"
> (ins)scheme@(guile-user)> (list (specification->package+output
> "git:send-email"))
> $16 = (#<package git <at> 2.32.0 gnu/packages/version-control.scm:176
> 7f730e918320>)
> (ins)scheme@(guile-user)> (list (specification->package+output
> "git"))
> $17 = (#<package git <at> 2.32.0 gnu/packages/version-control.scm:176
> 7f730e918320>)
> 
> Meanwhile, (specifications->manifest '("git" "git:send-email")) does
> actually return a manifest with both the "out" and the "send-email"
> outputs of git.
> 
> (package->manifest-entry (specification->package+output "git:send-
> email"))
> returns a manifest entry for "git:out" and
> (package->manifest-entry git "send-email") returns a manifest entry
> for
> "git:send-email".
I think for this use of specification->package+output you need to
compose it with list like (compose list specification->package+output). 
The reason you observe this behaviours is that specification-
>package+output returns multiple values, whereas package->manifest-
entry expects a single value which is either a package or a list of the
form (package "output").

Regards






Information forwarded to bug-guix <at> gnu.org:
bug#50501; Package guix. (Tue, 14 Sep 2021 09:56:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Efraim Flashner <efraim <at> flashner.co.il>, 50501 <at> debbugs.gnu.org
Subject: Re: bug#50501: packages->manifest can lose the desired package output
Date: Tue, 14 Sep 2021 11:55:24 +0200
Hi,

Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:

> Am Freitag, den 10.09.2021, 12:34 +0300 schrieb Efraim Flashner:
>> I've been fighting my manifest to try to get "git" and "git:send-
>> email" both included, while using package transformations. For the
>> sake of brevity, here's a stripped down version of my manifest:
>> 
>> (packages->manifest
>>   (map specification->package+output
>>     '("git" "git:send-email")))
>> 
>> Here's what I learned from some experimentation:
>> 
>> (cmd)scheme@(guile-user)> (specification->package+output "git:send-
>> email")
>> $14 = #<package git <at> 2.32.0 gnu/packages/version-control.scm:176
>> 7f730e918320>
>> $15 = "send-email"
>> (ins)scheme@(guile-user)> (list (specification->package+output
>> "git:send-email"))
>> $16 = (#<package git <at> 2.32.0 gnu/packages/version-control.scm:176
>> 7f730e918320>)
>> (ins)scheme@(guile-user)> (list (specification->package+output
>> "git"))
>> $17 = (#<package git <at> 2.32.0 gnu/packages/version-control.scm:176
>> 7f730e918320>)
>> 
>> Meanwhile, (specifications->manifest '("git" "git:send-email")) does
>> actually return a manifest with both the "out" and the "send-email"
>> outputs of git.
>> 
>> (package->manifest-entry (specification->package+output "git:send-
>> email"))
>> returns a manifest entry for "git:out" and
>> (package->manifest-entry git "send-email") returns a manifest entry
>> for
>> "git:send-email".
> I think for this use of specification->package+output you need to
> compose it with list like (compose list specification->package+output). 
> The reason you observe this behaviours is that specification-
>>package+output returns multiple values, whereas package->manifest-
> entry expects a single value which is either a package or a list of the
> form (package "output").

Yes, and Guile truncates multiple-value returns by default:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (list (values 1 2))
$7 = (1)
scheme@(guile-user)> (+ (values 1 2) 2)
$8 = 3
--8<---------------cut here---------------end--------------->8---

Ludo’.




Added tag(s) notabug. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 Sep 2021 09:56:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 50501 <at> debbugs.gnu.org and Efraim Flashner <efraim <at> flashner.co.il> Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 Sep 2021 09:56:02 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. (Tue, 12 Oct 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 308 days ago.

Previous Next


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