all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#50501: packages->manifest can lose the desired package output
@ 2021-09-10  9:34 Efraim Flashner
  2021-09-10 14:26 ` Liliana Marie Prikler
  0 siblings, 1 reply; 3+ messages in thread
From: Efraim Flashner @ 2021-09-10  9:34 UTC (permalink / raw)
  To: 50501

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

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@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@2.32.0 gnu/packages/version-control.scm:176 7f730e918320>)
(ins)scheme@(guile-user)> (list (specification->package+output "git"))
$17 = (#<package git@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@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#50501: packages->manifest can lose the desired package output
  2021-09-10  9:34 bug#50501: packages->manifest can lose the desired package output Efraim Flashner
@ 2021-09-10 14:26 ` Liliana Marie Prikler
  2021-09-14  9:55   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Liliana Marie Prikler @ 2021-09-10 14:26 UTC (permalink / raw)
  To: Efraim Flashner, 50501

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@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@2.32.0 gnu/packages/version-control.scm:176
> 7f730e918320>)
> (ins)scheme@(guile-user)> (list (specification->package+output
> "git"))
> $17 = (#<package git@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






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#50501: packages->manifest can lose the desired package output
  2021-09-10 14:26 ` Liliana Marie Prikler
@ 2021-09-14  9:55   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2021-09-14  9:55 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 50501

Hi,

Liliana Marie Prikler <liliana.prikler@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@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@2.32.0 gnu/packages/version-control.scm:176
>> 7f730e918320>)
>> (ins)scheme@(guile-user)> (list (specification->package+output
>> "git"))
>> $17 = (#<package git@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’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-14  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-10  9:34 bug#50501: packages->manifest can lose the desired package output Efraim Flashner
2021-09-10 14:26 ` Liliana Marie Prikler
2021-09-14  9:55   ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.