GNU bug report logs - #26264
[PATCH 0/1] Use '@' to separate name, version in package-full-name

Previous Next

Package: guix-patches;

Reported by: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>

Date: Sun, 26 Mar 2017 12:27:02 UTC

Severity: normal

Tags: patch

Merged with 26239, 26265

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26264 in the body.
You can then email your comments to 26264 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Sun, 26 Mar 2017 12:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 26 Mar 2017 12:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Alex Sassmannshausen <alex <at> pompo.co>
Subject: [PATCH 0/1] Use '@' to separate name, version in package-full-name
Date: Sun, 26 Mar 2017 14:25:54 +0200
Hello,

Currently, when `guix refresh -l` is used, package names are emitted with a
'-' separator.

This means the output from guix refresh -l cannot be used to issue guix
commands.  This patch addresses the issue by adding an optional parameter
`for-ui` to `package-full-name`, which, when passed, results in package names
being emitted with the '@' separator.

There are several other approaches that could be taken:

* change the behaviour of package-full-name by default to use '@'.  This would
  result in significant semantic changes in different places in Guix, where
  '-' is expected.

* Don't use package-full-name in guix refresh -l's `list-dependents`.  Instead
  just emit the package name, not the full name, or manually concatenate name
  '@' version.

I prefer adding the optional parameter to full-name as `package-full-name` is
used in different places for emitting UI package names, and we probably want
to switch all of those to the '@' semantics over time.

WDYT?

Alex

Alex Sassmannshausen (1):
  packages: Add optional `for-ui` param to `package-full-name`.

 guix/packages.scm        | 9 +++++----
 guix/scripts/refresh.scm | 6 +++---
 tests/packages.scm       | 4 ++++
 3 files changed, 12 insertions(+), 7 deletions(-)

-- 
2.12.1





Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Sun, 26 Mar 2017 14:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: alex.sassmannshausen <at> gmail.com, 26264 <at> debbugs.gnu.org
Cc: alex <at> pompo.co
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name, version in
 package-full-name
Date: Sun, 26 Mar 2017 16:57:06 +0200
[Message part 1 (text/plain, inline)]
Alex,

(I'm tempted to CC bug #26239 to mirror this discussion there, but I'm
not sure if debbugs would DTRT.)

On 26/03/17 14:25, Alex Sassmannshausen wrote:
> There are several other approaches that could be taken:
> 
> * change the behaviour of package-full-name by default to use '@'.

This is the tabula-rasa (well, ʕノ•ᴥ•ʔノ ︵ ┻━┻) approach I took myself.

> This would result in significant semantic changes in different places
> in Guix, where '-' is expected.

Could you expand on what these are?

My assumptions were:

  - This touches mainly (only? but then I don't use fancy things
    like emacs-guix) UI messages, or I missed it.

  - If someone's scripts do rely on parsing this kind of output, they're
    living on borrowed time, and will need to fix their scripts anyway.

  - ‘-’'s been deprecated for quite a long while, and the next
    core-updates cycle is a good time to purge the last remnants of it.
    Of course, this patch is about 2 cycles old by now...

  - If we're rebuilding the whole world for this we should get it right.

These assumptions may well be wrong (hence the call for feedback).

Thoughts?

T G-R

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Sun, 26 Mar 2017 18:42:02 GMT) Full text and rfc822 format available.

Message #11 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name,
 version in package-full-name
Date: Sun, 26 Mar 2017 20:41:40 +0200
Hey Tobias,

Tobias Geerinckx-Rice writes:

> Alex,
>
> (I'm tempted to CC bug #26239 to mirror this discussion there, but I'm
> not sure if debbugs would DTRT.)

Right — sorry, not sure what the best approach is for that!
>
> On 26/03/17 14:25, Alex Sassmannshausen wrote:
>> There are several other approaches that could be taken:
>> 
>> * change the behaviour of package-full-name by default to use '@'.
>
> This is the tabula-rasa (well, ʕノ•ᴥ•ʔノ ︵ ┻━┻) approach I took myself.
>
>> This would result in significant semantic changes in different places
>> in Guix, where '-' is expected.
>
> Could you expand on what these are?

The example I encountered which caused me to bail (after having adapted
a few unit tests, e.g. in tests/profiles.scm, to expect the new name
format), is at `gnu/packages/commencement.scm`, line 234 ff (in
`gcc-boot0`):
-----------------8<------------------>8----------------
                   ,@(map (lambda (lib)
                            ;; Drop trailing letters, as gmp-6.0.0a unpacks
                            ;; into gmp-6.0.0.
                            `(symlink ,(string-trim-right
                                        (package-full-name lib)
                                        char-set:letter)
                                      ,(package-name lib)))
                          (list gmp-6.0 mpfr mpc))))
-----------------8<------------------>8----------------

It seems `package-full-name` is here used to write symlinks.  I'm afraid
I don't understand the context well enough to ascertain what effect
changing this to '@' based writing would have.

> My assumptions were:
>
>   - This touches mainly (only? but then I don't use fancy things
>     like emacs-guix) UI messages, or I missed it.

Right, that's what I had hoped too.

>   - If someone's scripts do rely on parsing this kind of output, they're
>     living on borrowed time, and will need to fix their scripts anyway.

Well… I guess it all depends on whether the function is intended for
file-system or UI name generation, and whether file-system filenames
should have a different format from UI names…

>   - ‘-’'s been deprecated for quite a long while, and the next
>     core-updates cycle is a good time to purge the last remnants of it.
>     Of course, this patch is about 2 cycles old by now...

Right, agreed, in the UI context; don't know about filename schemes.

>   - If we're rebuilding the whole world for this we should get it right.

Agreed.

HTH,

Alex




Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Tue, 28 Mar 2017 15:04:02 GMT) Full text and rfc822 format available.

Message #14 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name,
 version in package-full-name
Date: Tue, 28 Mar 2017 17:03:07 +0200
Hello!

Thanks for addressing this longstanding issue!

For the record ‘package-full-name’ was briefly discussed at the time:

  https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00891.html

I suppose we’ll have to grep for all uses in the code to see whether
they rely on a hyphen for separation, including the web site (and prolly
Emacs-Guix.)

Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com> skribis:

> The example I encountered which caused me to bail (after having adapted
> a few unit tests, e.g. in tests/profiles.scm, to expect the new name
> format), is at `gnu/packages/commencement.scm`, line 234 ff (in
> `gcc-boot0`):
> -----------------8<------------------>8----------------
>                    ,@(map (lambda (lib)
>                             ;; Drop trailing letters, as gmp-6.0.0a unpacks
>                             ;; into gmp-6.0.0.
>                             `(symlink ,(string-trim-right
>                                         (package-full-name lib)
>                                         char-set:letter)
>                                       ,(package-name lib)))
>                           (list gmp-6.0 mpfr mpc))))
> -----------------8<------------------>8----------------
>
> It seems `package-full-name` is here used to write symlinks.  I'm afraid
> I don't understand the context well enough to ascertain what effect
> changing this to '@' based writing would have.

This code definitely relies on ‘package-full-name’ using a hyphen (it
computes the name of the directory GMP etc. extract to.)

>>   - If someone's scripts do rely on parsing this kind of output, they're
>>     living on borrowed time, and will need to fix their scripts anyway.
>
> Well… I guess it all depends on whether the function is intended for
> file-system or UI name generation, and whether file-system filenames
> should have a different format from UI names…

Right, I think there have been uses beyond merely UI info, and these are
those we need to find by grepping through the code.  :-)

>>   - ‘-’'s been deprecated for quite a long while, and the next
>>     core-updates cycle is a good time to purge the last remnants of it.
>>     Of course, this patch is about 2 cycles old by now...
>
> Right, agreed, in the UI context; don't know about filename schemes.

+1!  That can be done in a subsequent commit.

>>   - If we're rebuilding the whole world for this we should get it right.
>
> Agreed.

This change should not trigger a full rebuild (the ‘package-full-name’
call in commencement.scm must be adjusted, but that’s fine.)

So Alex (or Tobias?), the check list would be:

  1. Make sure it’s a zero-rebuild change; if it’s not, it’s a bug;

  2. Grep ‘package-full-name’ through guix.git and guix-artwork.git and
     see if any use clearly requires a hyphen;

  3. Change the uses in guix-artwork.git (the web site) that uses
    ‘package-full-name’ to compute anchors;

  4. Make sure ‘make check’ passes.

If we get a green light here, then we can go ahead!

Thanks,
Ludo’.




Merged 26264 26265. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Tue, 28 Mar 2017 15:05:02 GMT) Full text and rfc822 format available.

Merged 26239 26264 26265. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Tue, 28 Mar 2017 15:05:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Tue, 28 Mar 2017 15:19:01 GMT) Full text and rfc822 format available.

Message #21 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: ludo <at> gnu.org, alex.sassmannshausen <at> gmail.com
Cc: 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name, version in
 package-full-name
Date: Tue, 28 Mar 2017 17:19:23 +0200
[Message part 1 (text/plain, inline)]
On 28/03/17 17:03, Ludovic Courtès wrote:
> So Alex (or Tobias?)

It's up to Alex. I wouldn't mind giving this a try, or not.

Kind regards,

T G-R

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Tue, 28 Mar 2017 19:54:01 GMT) Full text and rfc822 format available.

Message #24 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: ludo <at> gnu.org
Cc: 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name, version in
 package-full-name
Date: Tue, 28 Mar 2017 21:49:08 +0200
[Message part 1 (text/plain, inline)]
On 28/03/17 18:06, Ludovic Courtès wrote:
> There were 3 different numbers for the same thing (yours plus the two
> opened by Alex), which is why I merged them.

I know :-) I was just surprised that I didn't get notifications about
that via e-mail.

Kind regards,

T G-R

[signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 26 Apr 2017 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Sat, 06 May 2017 18:29:01 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 06 May 2017 18:31:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Sat, 06 May 2017 18:31:03 GMT) Full text and rfc822 format available.

Message #33 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: ludo <at> gnu.org, alex.sassmannshausen <at> gmail.com
Cc: 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name, version in
 package-full-name
Date: Sat, 6 May 2017 20:32:14 +0200
[Message part 1 (text/plain, inline)]
Guix,

On 28/03/17 17:19, Tobias Geerinckx-Rice wrote:
> I wouldn't mind giving this a try, or not.

More revenge from the pre-new-job-mailbag.

I'm sticking to my original patch, and changed the problematic callers
to not use ‘package-full-name’ at all. I don't think it's the right
abstraction in any of those cases. See the overly verbose commit messages.

Kind regards,

T G-R

[0004-packages-Use-as-a-version-separator.patch (text/x-patch, attachment)]
[0003-profiles-Don-t-use-PACKAGE-FULL-NAME.patch (text/x-patch, attachment)]
[0002-gnu-gcc-boot0-Don-t-use-PACKAGE-FULL-NAME.patch (text/x-patch, attachment)]
[0001-graph-Don-t-use-PACKAGE-FULL-NAME.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Sun, 07 May 2017 15:38:02 GMT) Full text and rfc822 format available.

Message #36 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: alex.sassmannshausen <at> gmail.com, 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name,
 version in package-full-name
Date: Sun, 07 May 2017 17:37:33 +0200
Hello!

Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> From 43892525fc981533445e60a649425791cc315d0a Mon Sep 17 00:00:00 2001
> From: Tobias Geerinckx-Rice <me <at> tobias.gr>
> Date: Sat, 6 May 2017 14:32:12 +0200
> Subject: [PATCH 4/4] packages: Use "@" as a version separator.
>
> * guix/packages.scm (package-full-name): Use "@" instead of "-" to separate
> PACKAGE-NAME and PACKAGE-VERSION.
> ---
>  guix/packages.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/guix/packages.scm b/guix/packages.scm
> index 44f2c32fb..802405102 100644
> --- a/guix/packages.scm
> +++ b/guix/packages.scm
> @@ -385,8 +385,8 @@ object."
>  
>  
>  (define (package-full-name package)
> -  "Return the full name of PACKAGE--i.e., `NAME-VERSION'."
> -  (string-append (package-name package) "-" (package-version package)))
> +  "Return the full name of PACKAGE--i.e., `NAME <at> VERSION'."
> +  (string-append (package-name package) "@" (package-version package)))

WDYT of making it:

  (define* (package-full-name package #:optional (separator "@"))
    …)

?

(I think I suggested it somewhere, but maybe not.  :-))

That would make the adjustments to places that need a hyphen slightly
shorter.

Thanks, and good luck with your new $DAYJOB!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Sun, 07 May 2017 21:13:02 GMT) Full text and rfc822 format available.

Message #39 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: ludo <at> gnu.org
Cc: 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name, version in
 package-full-name
Date: Sun, 7 May 2017 23:13:29 +0200
[Message part 1 (text/plain, inline)]
Ludo',

On 07/05/17 17:37, Ludovic Courtès wrote:
> WDYT of making it:
>   (define* (package-full-name package #:optional (separator "@"))
>     …)
> ?
> (I think I suggested it somewhere, but maybe not.  :-))

You did! I simply forgot to address it explicitly (‘I'm sticking...’).

> That would make the adjustments to places that need a hyphen slightly
> shorter.

I considered it back when, but decided not to because it just felt...
wrong. That's it. My intuitive, rambling reasoning:

- All of the patched ex-callers are manually constructing some raw
  file or directory name. It includes the package's name and version
  in some way, but not really Guix's abstract concept of a
  ‘package-full-name’ atom. It just happened to be the same string.

- Making ‘separator’ configurable turns ‘package-full-name’ into
  ‘package-name-version-join’. If one cares about the separator,
  one also cares about the components, at which point one should just
  call string-join explicitly. Doing so isn't ugly, and is more clear.

Does that make any sense?

In the end, I care more about users' ability to finally copy & paste
without confusing warnings than my perso'pinions on function naming.
This bug has been open for long enough.

> Thanks, and good luck with your new $DAYJOB!

Thanks! It doesn't involve computers, so it won't last.

Kind regards,

T G-R

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Mon, 08 May 2017 12:40:01 GMT) Full text and rfc822 format available.

Message #42 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name,
 version in package-full-name
Date: Mon, 08 May 2017 14:39:03 +0200
Heya!

Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> On 07/05/17 17:37, Ludovic Courtès wrote:
>> WDYT of making it:
>>   (define* (package-full-name package #:optional (separator "@"))
>>     …)
>> ?
>> (I think I suggested it somewhere, but maybe not.  :-))
>
> You did! I simply forgot to address it explicitly (‘I'm sticking...’).
>
>> That would make the adjustments to places that need a hyphen slightly
>> shorter.
>
> I considered it back when, but decided not to because it just felt...
> wrong. That's it. My intuitive, rambling reasoning:
>
> - All of the patched ex-callers are manually constructing some raw
>   file or directory name. It includes the package's name and version
>   in some way, but not really Guix's abstract concept of a
>   ‘package-full-name’ atom. It just happened to be the same string.
>
> - Making ‘separator’ configurable turns ‘package-full-name’ into
>   ‘package-name-version-join’. If one cares about the separator,
>   one also cares about the components, at which point one should just
>   call string-join explicitly. Doing so isn't ugly, and is more clear.
>
> Does that make any sense?

I does, I wondered about that too.

So yeah, please push the patches, thanks!

>> Thanks, and good luck with your new $DAYJOB!
>
> Thanks! It doesn't involve computers, so it won't last.

Heheh.  :-)

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Sat, 20 May 2017 09:29:02 GMT) Full text and rfc822 format available.

Message #45 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: ludo <at> gnu.org, 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name,
 version in package-full-name
Date: Sat, 20 May 2017 11:28:44 +0200
[Message part 1 (text/plain, inline)]
Heya,

Following on from Tobias patch I will also submit my revised patch.  I'm
afraid I've been sitting on it for a while.

My patch takes the approach of refactoring ‘package-full-name‘ to accept
an optional argument, ‘separator’, which defaults to ’@’ as proposed by
Ludo.

On the bright side, it seems both me and Tobias are touching the same
files in our patches, and presumably have done some testing — so either
patch should work nicely.

I'm happy for either patch to be pushed.

Best wishes,

Alex

[0001-Use-as-default-separator-in-package-full-name.patch (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
Tobias Geerinckx-Rice writes:

> Guix,
>
> On 28/03/17 17:19, Tobias Geerinckx-Rice wrote:
>> I wouldn't mind giving this a try, or not.
>
> More revenge from the pre-new-job-mailbag.
>
> I'm sticking to my original patch, and changed the problematic callers
> to not use ‘package-full-name’ at all. I don't think it's the right
> abstraction in any of those cases. See the overly verbose commit messages.
>
> Kind regards,
>
> T G-R
>
> From 43892525fc981533445e60a649425791cc315d0a Mon Sep 17 00:00:00 2001
> From: Tobias Geerinckx-Rice <me <at> tobias.gr>
> Date: Sat, 6 May 2017 14:32:12 +0200
> Subject: [PATCH 4/4] packages: Use "@" as a version separator.
>
> * guix/packages.scm (package-full-name): Use "@" instead of "-" to separate
> PACKAGE-NAME and PACKAGE-VERSION.
> ---
>  guix/packages.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/guix/packages.scm b/guix/packages.scm
> index 44f2c32fb..802405102 100644
> --- a/guix/packages.scm
> +++ b/guix/packages.scm
> @@ -385,8 +385,8 @@ object."
>  
>  
>  (define (package-full-name package)
> -  "Return the full name of PACKAGE--i.e., `NAME-VERSION'."
> -  (string-append (package-name package) "-" (package-version package)))
> +  "Return the full name of PACKAGE--i.e., `NAME <at> VERSION'."
> +  (string-append (package-name package) "@" (package-version package)))
>  
>  (define (%standard-patch-inputs)
>    (let* ((canonical (module-ref (resolve-interface '(gnu packages base))
> -- 
> 2.12.2
>
>
> From 0325e536cf557ff48d885948bf5fab8f59bfc444 Mon Sep 17 00:00:00 2001
> From: Tobias Geerinckx-Rice <me <at> tobias.gr>
> Date: Sat, 6 May 2017 14:32:06 +0200
> Subject: [PATCH 3/4] profiles: Don't use PACKAGE-FULL-NAME.
>
> The non-hash parts of store paths aren't constructed according to
> PACKAGE-FULL-NAME rules.  They just happened to match in the past.
>
> * tests/profile.scm ("profile-derivation, cross-compilation"): Use
> PACKAGE-NAME and PACKAGE-VERSION directly.
> ---
>  tests/profiles.scm | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/tests/profiles.scm b/tests/profiles.scm
> index d0b1e14a8..68e73c4ca 100644
> --- a/tests/profiles.scm
> +++ b/tests/profiles.scm
> @@ -230,15 +230,18 @@
>                   (and (string-suffix? name input) input)))
>               (derivation-inputs drv))))
>  
> +    (define (package-store-suffix package)
> +      (string-append (package-name package) "-" (package-version package)))
> +
>      ;; The inputs for grep and sed should be cross-build derivations, but that
>      ;; for the glibc-utf8-locales should be a native build.
>      (return (and (string=? (derivation-system drv) (%current-system))
> -                 (string=? (find-input (package-full-name packages:grep))
> +                 (string=? (find-input (package-store-suffix packages:grep))
>                             (derivation-file-name grep))
> -                 (string=? (find-input (package-full-name packages:sed))
> +                 (string=? (find-input (package-store-suffix packages:sed))
>                             (derivation-file-name sed))
>                   (string=? (find-input
> -                            (package-full-name packages:glibc-utf8-locales))
> +                            (package-store-suffix packages:glibc-utf8-locales))
>                             (derivation-file-name locales))))))
>  
>  (test-assert "package->manifest-entry defaults to \"out\""
> -- 
> 2.12.2
>
>
> From f10c4fb9d269b85f9c388356a17c2b8b2fc54bd5 Mon Sep 17 00:00:00 2001
> From: Tobias Geerinckx-Rice <me <at> tobias.gr>
> Date: Sat, 6 May 2017 14:31:56 +0200
> Subject: [PATCH 2/4] gnu: gcc-boot0: Don't use PACKAGE-FULL-NAME.
>
> Don't use Guix's naming conventions where a different one is expected.
>
> * gnu/packages/commencement.scm (gcc-boot0)[arguments]: Use PACKAGE-NAME
> and PACKAGE-VERSION directly.
> ---
>  gnu/packages/commencement.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> index 92f6e6c2e..dd3261e37 100644
> --- a/gnu/packages/commencement.scm
> +++ b/gnu/packages/commencement.scm
> @@ -255,7 +255,8 @@
>                              ;; Drop trailing letters, as gmp-6.0.0a unpacks
>                              ;; into gmp-6.0.0.
>                              `(symlink ,(string-trim-right
> -                                        (package-full-name lib)
> +                                        (string-append (package-name lib) "-"
> +                                                       (package-version lib))
>                                          char-set:letter)
>                                        ,(package-name lib)))
>                            (list gmp-6.0 mpfr mpc))))
> -- 
> 2.12.2
>
>
> From c090e526e21a960f34f0f02f9904757952d5a36e Mon Sep 17 00:00:00 2001
> From: Tobias Geerinckx-Rice <me <at> tobias.gr>
> Date: Sat, 6 May 2017 14:31:48 +0200
> Subject: [PATCH 1/4] graph: Don't use PACKAGE-FULL-NAME.
>
> Derivation files aren't named according to PACKAGE-FULL-NAME rules.
> We already forfeit any supposed abstraction by manually adding ".drv".
>
> * tests/graph.scm ("bag-emerged DAG"): Use PACKAGE-NAME and PACKAGE-VERSION
> directly.
> ---
>  tests/graph.scm | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/graph.scm b/tests/graph.scm
> index 6431c482f..53475597a 100644
> --- a/tests/graph.scm
> +++ b/tests/graph.scm
> @@ -130,7 +130,9 @@ edges."
>                       (map (lambda (destination)
>                              (list "p-0.drv"
>                                    (string-append
> -                                   (package-full-name destination)
> +                                   (package-name destination)
> +                                   "-"
> +                                   (package-version destination)
>                                     ".drv")))
>                            implicit)))))))


Information forwarded to guix-patches <at> gnu.org:
bug#26264; Package guix-patches. (Wed, 31 May 2017 12:12:02 GMT) Full text and rfc822 format available.

Message #48 received at 26264 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 26264 <at> debbugs.gnu.org
Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name,
 version in package-full-name
Date: Wed, 31 May 2017 14:11:19 +0200
Hi!

Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com> skribis:

> On the bright side, it seems both me and Tobias are touching the same
> files in our patches, and presumably have done some testing — so either
> patch should work nicely.
>
> I'm happy for either patch to be pushed.

Same here.  :-)  Tobias, thoughts?  ISTR Tobias wasn’t enthusiastic
about the idea of an optional argument.

Anyway we should push something now!

Thanks,
Ludo’.




bug closed, send any further explanations to 26239 <at> debbugs.gnu.org and Tobias Geerinckx-Rice <me <at> tobias.gr> Request was from Ricardo Wurmus <rekado <at> elephly.net> to control <at> debbugs.gnu.org. (Sun, 18 Jun 2017 11:05:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Jul 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 257 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.