all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: Mathieu Lirzin <mthl@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
Date: Thu, 03 Mar 2016 13:29:49 +0300	[thread overview]
Message-ID: <87k2ljzwf6.fsf@gmail.com> (raw)
In-Reply-To: <87wppo1hso.fsf@gnu.org> (Mathieu Lirzin's message of "Mon, 29 Feb 2016 01:28:23 +0100")

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Mathieu Lirzin (2016-02-29 03:28 +0300) wrote:

[...]
> I have left the emacs interface untouched.

Hm, I wonder why?  You already had the required changes in your initial
patch.  Anyway, I'm attaching the patch with these changes.  The only
difference from your original patch is replacing 'package-full-name'
with 'make-package-specification' in "guix-main.scm".

Sorry if it was discussed but why 'package-full-name' from (guix
packages) wasn't changed?

Also I have a question regarding hydra.  Will hydra jobs still have
such names as "git-2.6.3" or will they also be changed to "git@2.6.3"?

If the former, then some additional changes should be done (the patch
for this is also attached).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-Use-to-separate-package-names-and-version-numb.patch --]
[-- Type: text/x-patch, Size: 3162 bytes --]

From 2dbfe087905cc08715bba0f4d4dd0093fd93372b Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Thu, 3 Mar 2016 12:53:03 +0300
Subject: [PATCH 1/2] emacs: Use '@' to separate package names and version
 numbers.

This is a followup to commit 1b846da8c372bee78851439fd9e72b2499115e5a.

* emacs/guix-base.el (guix-package-name-specification): Use "@" instead
of "-".
* emacs/guix-main.scm (name+version->full-name): Likewise.
(package-inputs-names): Use 'make-package-specification' instead of
'package-full-name'.
(full-name->name+version): Update the docstring.
* emacs/guix-ui-package.el (guix-packages-by-name): Likewise.
---
 emacs/guix-base.el       | 2 +-
 emacs/guix-main.scm      | 7 ++++---
 emacs/guix-ui-package.el | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/emacs/guix-base.el b/emacs/guix-base.el
index 1248ecb..75d19cb 100644
--- a/emacs/guix-base.el
+++ b/emacs/guix-base.el
@@ -44,7 +44,7 @@
 
 (defun guix-package-name-specification (name version &optional output)
   "Return Guix package specification by its NAME, VERSION and OUTPUT."
-  (concat name "-" version
+  (concat name "@" version
           (when output (concat ":" output))))
 
 \f
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm
index 11b9c77..34da6ac 100644
--- a/emacs/guix-main.scm
+++ b/emacs/guix-main.scm
@@ -86,13 +86,13 @@
 (define (full-name->name+version spec)
   "Given package specification SPEC with or without output,
 return two values: name and version.  For example, for SPEC
-\"foo-0.9.1b:lib\", return \"foo\" and \"0.9.1b\"."
+\"foo@0.9.1b:lib\", return \"foo\" and \"0.9.1b\"."
   (let-values (((name version output)
                 (package-specification->name+version+output spec)))
     (values name version)))
 
 (define (name+version->full-name name version)
-  (string-append name "-" version))
+  (string-append name "@" version))
 
 (define* (make-package-specification name #:optional version output)
   (let ((full-name (if version
@@ -263,7 +263,8 @@ Example:
   "Return a list of full names of the packages from package INPUTS."
   (filter-map (match-lambda
                ((_ (? package? package))
-                (package-full-name package))
+                (make-package-specification (package-name package)
+                                            (package-version package)))
                ((_ (? package? package) output)
                 (make-package-specification (package-name package)
                                             (package-version package)
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index d6d2633..56aa64f 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -945,7 +945,7 @@ See `guix-find-location' for the meaning of DIRECTORY."
 (defun guix-packages-by-name (name &optional profile)
   "Display Guix packages with NAME.
 NAME is a string with name specification.  It may optionally contain
-a version number.  Examples: \"guile\", \"guile-2.0.11\".
+a version number.  Examples: \"guile\", \"guile@2.0.11\".
 
 If PROFILE is nil, use `guix-current-profile'.
 Interactively with prefix, prompt for PROFILE."
-- 
2.6.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-emacs-hydra-Use-to-separate-job-names-and-version-nu.patch --]
[-- Type: text/x-patch, Size: 2278 bytes --]

From c6825b189f7b5d908c5fbe36d933fbe187cbc4bd Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Thu, 3 Mar 2016 12:55:21 +0300
Subject: [PATCH 2/2] emacs: hydra: Use '-' to separate job names and version
 numbers.

* emacs/guix-hydra.el (guix-hydra-job-name-specification): New procedure.
* emacs/guix-ui-package.el (guix-package-info-insert-systems)
(guix-package-list-latest-builds): Use it.
---
 emacs/guix-hydra.el      | 4 ++++
 emacs/guix-ui-package.el | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/emacs/guix-hydra.el b/emacs/guix-hydra.el
index 4294839..9f876e7 100644
--- a/emacs/guix-hydra.el
+++ b/emacs/guix-hydra.el
@@ -36,6 +36,10 @@
   (concat ".*\\." (regexp-opt guix-help-system-types) "\\'")
   "Regexp matching a full name of Hydra job (including system).")
 
+(defun guix-hydra-job-name-specification (name version)
+  "Return Hydra's job name specification by NAME and VERSION."
+  (concat name "-" version))
+
 (defun guix-hydra-message (entries search-type &rest _)
   "Display a message after showing Hydra ENTRIES."
   ;; XXX Add more messages maybe.
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 56aa64f..9d81c61 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -34,6 +34,7 @@
 (require 'guix-guile)
 (require 'guix-entry)
 (require 'guix-utils)
+(require 'guix-hydra)
 (require 'guix-hydra-build)
 (require 'guix-read)
 (require 'guix-license)
@@ -388,7 +389,7 @@ formatted with this string, an action button is inserted.")
                           :system (button-label btn))))
                (apply #'guix-hydra-build-get-display
                       'latest args)))
-   'job-name (guix-package-name-specification
+   'job-name (guix-hydra-job-name-specification
               (guix-entry-value entry 'name)
               (guix-entry-value entry 'version))))
 
@@ -776,7 +777,7 @@ for all ARGS."
   (interactive
    (let ((entry (guix-list-current-entry)))
      (guix-hydra-build-latest-prompt-args
-      :job (guix-package-name-specification
+      :job (guix-hydra-job-name-specification
             (guix-entry-value entry 'name)
             (guix-entry-value entry 'version)))))
   (apply #'guix-hydra-latest-builds number args))
-- 
2.6.3


  parent reply	other threads:[~2016-03-03 10:29 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
2016-01-24 20:19 ` [PATCH 01/13] tests: Use 'dummy-origin' for lint tests when possible Mathieu Lirzin
2016-01-26 15:58   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 02/13] lint: Remove an unneeded clause in 'check-patch-file-names' Mathieu Lirzin
2016-01-26 16:00   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 03/13] lint: Rewrite 'check-patch-file-names' Mathieu Lirzin
2016-01-26 16:01   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 04/13] utils: Use '@' for separating package names and version numbers Mathieu Lirzin
2016-01-25 11:37   ` Alex Kost
2016-01-25 20:56     ` Mathieu Lirzin
2016-01-26 16:22       ` Ludovic Courtès
2016-01-26 20:52         ` Mathieu Lirzin
2016-01-26 21:08           ` Ludovic Courtès
2016-02-19 20:49         ` Mathieu Lirzin
2016-02-23 11:11           ` Ludovic Courtès
2016-02-29  0:28             ` Mathieu Lirzin
2016-02-29 16:00               ` Ludovic Courtès
2016-03-02 21:35                 ` Mathieu Lirzin
2016-03-05  1:28                 ` Nils Gillmann
2016-03-05  9:24                   ` Alex Kost
2016-03-05  9:36                   ` Mathieu Lirzin
2016-03-03 10:29               ` Alex Kost [this message]
2016-03-03 16:55                 ` Ludovic Courtès
2016-03-04 10:19                   ` Alex Kost
2016-03-04 23:03                 ` Mathieu Lirzin
2016-03-04 23:25                   ` Ludovic Courtès
2016-03-05  1:08                     ` Mathieu Lirzin
2016-03-05  9:16                   ` Alex Kost
2016-01-25 14:04   ` Thompson, David
2016-01-25 21:41     ` Mathieu Lirzin
2016-01-25 23:33       ` Alex Kost
2016-01-26 17:57         ` Mathieu Lirzin
2016-01-24 20:19 ` [PATCH 05/13] packages: Use '@' in package record printers Mathieu Lirzin
2016-01-26 16:22   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 06/13] build: Generate man pages after compiling guile objects Mathieu Lirzin
2016-01-26 16:52   ` Ludovic Courtès
2016-01-26 20:08     ` Mathieu Lirzin
2016-01-28  2:37       ` Eric Bavier
2016-01-28 15:44         ` Mathieu Lirzin
2016-01-28 15:59           ` Eric Bavier
2016-01-28 17:00             ` Mathieu Lirzin
2016-01-29  0:27               ` Eric Bavier
2016-01-29 16:17                 ` Mathieu Lirzin
2016-01-29 16:46                   ` Eric Bavier
2016-01-29 22:56                     ` Mathieu Lirzin
2016-01-31  9:17                       ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 07/13] build: Add 'DL' silent rule Mathieu Lirzin
2016-01-26 16:28   ` Ludovic Courtès
2016-01-26 17:44     ` Mathieu Lirzin
2016-01-26 19:22       ` Taylan Ulrich Bayırlı/Kammer
2016-01-26 21:06       ` Ludovic Courtès
2016-01-26 21:14         ` Mathieu Lirzin
2016-01-24 20:19 ` [PATCH 08/13] build: Add 'DOT' " Mathieu Lirzin
2016-01-26 16:28   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 09/13] build: Add 'EMACS' " Mathieu Lirzin
2016-01-26 16:28   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 10/13] build: Add 'HELP2MAN' " Mathieu Lirzin
2016-01-26 16:29   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 11/13] build: Delete emacs/guix-autoloads.el when 'make clean' Mathieu Lirzin
2016-01-26 16:33   ` Ludovic Courtès
2016-01-26 22:55     ` Mathieu Lirzin
2016-01-24 20:19 ` [PATCH 12/13] build: Use 'GEN' and 'at' silent rules Mathieu Lirzin
2016-01-26 16:34   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 13/13] Update .gitignore Mathieu Lirzin
2016-01-26 16:34   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2ljzwf6.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mthl@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.