Subject: bug#26265: [PATCH 1/1] packages: Add optional `for-ui` param to `package-full-name`.

From: [email-masked] (Ludovic Courtès)
Date: Tue, 28 Mar 2017 17:06:51 +0200

Alex Sassmannshausen <[email-masked]> skribis:

> * guix/packages.scm (package-full-name): Add optional parameter `for-ui`.
> * guix/scripts/refresh.scm (list-dependents): Use it.
> * tests/packages.scm: Add tests for `package-full-name`.

[...]

> +(define* (package-full-name package #:optional for-ui)
> +  "Return the full name of PACKAGE--i.e., `NAME-VERSION'.  If FOR-UI? is #t,
> +return the full name of PACKAGE using \"@\" as the NAME, VERSION separator."

I’d replace ‘for-ui’ with:

  #:optional (separator "@")

I think it’s less ambiguous.

That also means that we’d need to change *non*-UI call sites, instead of
changing UI call sites.  Hopefully there are few of them, but as
discussed in the other message, it takes manual analysis to determine
which use requires a hyphen and which one does not.

Thanks,
Ludo’.