packages->manifest can lose the desired package output

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • Liliana Marie Prikler
  • Ludovic Courtès
Owner
unassigned
Submitted by
Efraim Flashner
Severity
normal
E
E
Efraim Flashner wrote on 10 Sep 2021 11:34
(address . bug-guix@gnu.org)
YTsmnckiT+cq9vly@3900XT
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmE7JpoACgkQQarn3Mo9
g1GJExAAwSPep8IoUJG9iNrorT79B05CGTrfztw83PndQ02WU3fH5Z6QhFnB3jIU
806V7K87uSDurp2vS8uOzZPAF59CBVGXKkm/CMdBiqvKrN5td7gUOR7EWICy2E4R
0gGzlfIu1ESdPSTd1r3NL7JLjjbTMi5WE6P0YstZn74SZklNQ6z700jvMyQY0XK8
1pbDyeB15SLiw40apOn1uhfctfLmZUpCvEk2vFnqLGSPC3zHDzOzERfoOrQJyXHQ
kVkWwu+1jFJE0rGH7UieDdyqp5nXmyOqThhtV1dInoPgrmDjrtv/FQwpzsl73c8+
7XLWT3H9yDyfyrBevx0bT/ySBdnJKieuEqencOL/4WZo3PW8sG51GUBj9qwuQuzB
r72U+F51AOKukoFNeehN8og35XR4zF3HFrZSM2rYffhOWv6PpBrrTMJ2GX2IJyf2
cqVjlgIMPx7X6pRphiO8m3ULmYU2R3eBqx9uuqhOhmETGoHlNvFBE9tkCIeYgBNe
Dc2pXlmBIpXYq3QBZelBzIB3jOvgHhhn5I/P951ZBwFroLIZkLOVpsqhSFod/RX0
jCNRL0AmS0UzSIupDLhaWDiuzYJLoKInGfV66mIroVxy56iO+gj+osBqnW5/XRGD
sjb3LmXRIXw+N6RdklfUM7ZUU71f+57zxEdO+mb3jdtu9ruVFXU=
=+1SO
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 10 Sep 2021 16:26
f6914d44384d3e611728d8a8ab47d586c0a04101.camel@gmail.com
Hi Efraim,

Am Freitag, den 10.09.2021, 12:34 +0300 schrieb Efraim Flashner:
Toggle quote (34 lines)
> 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-
Toggle quote (1 lines)
>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
L
L
Ludovic Courtès wrote on 14 Sep 2021 11:55
Re: bug#50501: packages->manifest can lose the desired package output
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87ilz35vn7.fsf@gnu.org
Hi,

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

Toggle quote (42 lines)
> 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:

Toggle snippet (6 lines)
scheme@(guile-user)> (list (values 1 2))
$7 = (1)
scheme@(guile-user)> (+ (values 1 2) 2)
$8 = 3

Ludo’.
L
L
Ludovic Courtès wrote on 14 Sep 2021 11:55
control message for bug #50501
(address . control@debbugs.gnu.org)
87h7en5vmq.fsf@gnu.org
tags 50501 notabug
close 50501
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 50501@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 50501
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch