Can't (specification->package "package@version:output")

  • Open
  • quality assurance status badge
Details
2 participants
  • calcium
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
calcium
Severity
normal
C
C
calcium wrote on 5 Jan 2022 18:18
(address . bug-guix@gnu.org)
90c20a11-e5a7-4e13-7f75-0538aebe957d@disroot.org
The syntaxe to specify a package version and desired output
only works on guix install package@version:output

guix remove package@version:output doesn't works
guix remove package@version doesn't works

(specification->package "package@version") works
(specification->package "package:output") works

but both (specification->package "packge@version:output") doesn't work.
/etc/config.scm:line:col: Throw to key `quit' with args `(1)'.

Even though
guix package --export-manifest
;; => (specifications->manifest (list "package@version:output" "package@version"))

I tested "package@version:output" using "openjdk@11:doc"
T
T
Tobias Geerinckx-Rice wrote on 5 Jan 2022 21:36
(name . calcium)(address . calcium@disroot.org)
87wnjdhot8.fsf@nckx
Calcium,

Thanks for the report!

In future, please submit separate issues separately, it helps keep
discussion, er, separate. It's easier to merge issues than to
split them.

Toggle quote (2 lines)
> Can't (specification->package "package@version:output")

Short answer: it is not intended to work. Use
specification->package+output if you want outputs. This is not a
bug but a design decision. Which are not above critique, but
guix-devel@ might be a better place for that.

I've considered in the past to submit a cheeky patch silently
renaming specification->package+ouput to specification->package,
just to avoid this FAQ. It should be almost perfectly backwards
compatible in that no existing code should break with the same
input.

However I think clarity the greater value here, and did not submit
such a patch.

calcium via Bug reports for GNU Guix ???
Toggle quote (5 lines)
> The syntaxe to specify a package version and desired output
> only works on guix install package@version:output
>
> guix remove package@version:output doesn't works

I cannot reproduce this:

$ guix install git@2.34.0:send-email
$ guix remove git@2.34.0:send-email
$

Can you provide an example?

Toggle quote (2 lines)
> guix remove package@version doesn't works

‘package@version’ means ‘package@version:out’, not (a
hypothetical) ‘package@version:*’ wildcard. It neither installs
nor removes ‘all outputs’.

I did notice that, e.g.,

$ guix install git@2:send-email
$ guix remove git@2:send-email
guix remove: error: package 'git@2:send-email' not found in
profile
$

is asymmetrical. I wonder if there are any drawbacks to making it
work.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYdYJIw0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15fXEBAOC7Ha6+9ckE3lBXzFviuYkDdGBXd9mcvsAxgvG7
pGjbAP96ynRD3w3aV33c666z2XpFP+cW02jWYodFcCCAXMDHBQ==
=w2vh
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 53030
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