bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31088: Use '@' as version number separator in guix output


From: Chris Marusich
Subject: bug#31088: Use '@' as version number separator in guix output
Date: Mon, 09 Apr 2018 23:38:01 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi Pierre and Mathieu,

Thank you for the bug report, Pierre!  Mathieu, can you take a look at
the patch I've attached to this email?  It should fix this bug, but
since you made similar changes in the past, I'd value your feedback.

Pierre Neidhardt <address@hidden> writes:

> Would it be possible to separate the package name from the version
> number with '@' instead?

Pierre's suggestion makes sense to me.  Starting with Mathieu's commit
1b846da8c372bee78851439fd9e72b2499115e5a about one year ago, we use "@"
to separate the package name from the version in commands like "guix
package -i address@hidden" and also in exported scheme procedures like
specification->package (defined in (gnu packages)).  Before that, we
used "-" instead of "@".  When we made the change, it looks like we did
not also update the "dependencies" output from commands like "guix
package --show".

I've attached a patch that fixes the issue.  It applies cleanly to
df154c05dc65025eac2d14ab45699b34c7a1c7c8 (the tip of the master branch
at the time I drafted this email), and "make check" succeeds.  With the
change, the output now looks like this:

  $ ./pre-inst-env guix package --show=ncdu | recsel -p dependencies
  dependencies: address@hidden

I was not able to run "make check-system" successfully, but there is no
reason to suspect that the attached patch causes any problem, since the
"check-system" target was already failing in the same way at commit
df154c05dc65025eac2d14ab45699b34c7a1c7c8.  I'll open up a separate bug
report for that separate issue.

Because I changed the package-full-name procedure, this also fixes the
package names in other places, such as graphs produced by "guix graph".
I'm not sure how many package rebuilds (if any?) this will cause, and
I'd like to hear what Mathieu has to say about my patch, so I'll wait to
push it until after I get feedback from him or another interested
person.  We should probably also regenerate the images in
guix/doc/images (so that the delimiter used in the images is "@" instead
of "-", although I'm not sure yet how to regenerate the source dot
files.  Mathieu, please let me know what you think!

In the meantime, Pierre, you can work around the issue by writing a
Guile script that gets the package version using the Guix API like so:

  scheme@(guile-user)> ,use (gnu packages ncdu)
  scheme@(guile-user)> ,use (guix packages)
  scheme@(guile-user)> (package-version ncdu)
  $1 = "1.13"

If you aren't sure how to get started writing Guile scripts, please
refer to the section "Running Guile Scripts" in the Guile manual.

-- 
Chris

Attachment: 0001-guix-Separate-the-package-name-and-version-with-not.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]