unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 00/13] New syntax 'package@version' and compilation improvements.
@ 2016-01-24 20:19 Mathieu Lirzin
  2016-01-24 20:19 ` [PATCH 01/13] tests: Use 'dummy-origin' for lint tests when possible Mathieu Lirzin
                   ` (12 more replies)
  0 siblings, 13 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


Here is a set of patches, following <https://debbugs.gnu.org/19219> and the
poll about the new syntax for separating package names and version.  As a
bonus it contains:

  - a bug fix for guix lint tests
  - a compilation speed increase
  - some nice custom silent rules

It is more than possible, that I overkooked some usage of of "PACKAGE-VERSION"
that should be fixed.  Don't hesitate to tell me if you spot one.

Mathieu Lirzin (13):
  tests: Use 'dummy-origin' for lint tests when possible.
  lint: Remove an unneeded clause in 'check-patch-file-names'.
  lint: Rewrite 'check-patch-file-names'.
  utils: Use '@' for separating package names and version numbers.
  packages: Use '@' in package record printers.
  build: Generate man pages after compiling guile objects.
  build: Add 'DL' silent rule.
  build: Add 'DOT' silent rule.
  build: Add 'EMACS' silent rule.
  build: Add 'HELP2MAN' silent rule.
  build: Delete emacs/guix-autoloads.el when 'make clean'.
  build: Use 'GEN' and 'at' silent rules.
  Update .gitignore.

 .gitignore                      | 158 ++++++++++++++++++----------------------
 Makefile.am                     |  35 +++++++--
 NEWS                            |  13 ++++
 configure.ac                    |   4 +
 daemon.am                       |  11 +--
 doc.am                          | 100 ++++++++++++-------------
 doc/guix.texi                   |  12 +--
 emacs.am                        |   5 +-
 emacs/guix-base.el              |   2 +-
 emacs/guix-main.scm             |   4 +-
 gnu-system.am                   |  21 ++++--
 gnu/packages.scm                |  10 +--
 gnu/packages/commencement.scm   |   2 +-
 guix/build/utils.scm            |  25 ++-----
 guix/import/cabal.scm           |   2 +-
 guix/import/elpa.scm            |   2 +-
 guix/packages.scm               |  11 ++-
 guix/scripts/import/hackage.scm |   2 +-
 guix/scripts/lint.scm           |  34 ++++-----
 guix/ui.scm                     |   4 +-
 tests/graph.scm                 |   2 +-
 tests/guix-build.sh             |   4 +-
 tests/guix-lint.sh              |   2 +-
 tests/guix-package.sh           |   4 +-
 tests/lint.scm                  |  12 +--
 tests/packages.scm              |   4 +-
 tests/ui.scm                    |   6 +-
 tests/utils.scm                 |   4 +-
 28 files changed, 252 insertions(+), 243 deletions(-)

-- 
2.7.0.rc3


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PATCH 01/13] tests: Use 'dummy-origin' for lint tests when possible.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
@ 2016-01-24 20:19 ` 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
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* guix/tests/lint.scm ("patches: file names", "patches: not found"): Use
'dummy-origin'.  'sha256' field was wrongly set to a string instead of a
bytevector.
---
 tests/lint.scm | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-tests-Use-dummy-origin-for-lint-tests-when-possible.patch --]
[-- Type: text/x-patch; name="0001-tests-Use-dummy-origin-for-lint-tests-when-possible.patch", Size: 1487 bytes --]

diff --git a/tests/lint.scm b/tests/lint.scm
index b8dad13..54be50d 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012, 2013 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
+;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -308,10 +308,7 @@ requests."
      (with-warnings
        (let ((pkg (dummy-package "x"
                     (source
-                     (origin
-                       (method url-fetch)
-                       (uri "someurl")
-                       (sha256 "somesha")
+                     (dummy-origin
                        (patches (list "/path/to/y.patch")))))))
          (check-patch-file-names pkg)))
      "file names of patches should start with the package name")))
@@ -322,10 +319,7 @@ requests."
      (with-warnings
        (let ((pkg (dummy-package "x"
                     (source
-                     (origin
-                       (method url-fetch)
-                       (uri "someurl")
-                       (sha256 "somesha")
+                     (dummy-origin
                        (patches
                         (list (search-patch "this-patch-does-not-exist!"))))))))
          (check-patch-file-names pkg)))

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 02/13] lint: Remove an unneeded clause in 'check-patch-file-names'.
  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-24 20:19 ` 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
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* guix/scripts/lint.scm (check-patch-file-names): Don't check if patches
start with the package full name since matching the package name (which
is a prefix of the full name) is sufficient.
---
 guix/scripts/lint.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-lint-Remove-an-unneeded-clause-in-check-patch-file-n.patch --]
[-- Type: text/x-patch; name="0002-lint-Remove-an-unneeded-clause-in-check-patch-file-n.patch", Size: 1497 bytes --]

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index e2cc965..25f49a7 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
+;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -417,15 +417,12 @@ patch could not be found."
              (emit-warning package (condition-message c)
                            'patch-file-names)))
     (let ((patches   (and=> (package-source package) origin-patches))
-          (name      (package-name package))
-          (full-name (package-full-name package)))
+          (name      (package-name package)))
       (when (and patches
                  (any (match-lambda
                         ((? string? patch)
                          (let ((file (basename patch)))
-                           (not (or (eq? (string-contains file name) 0)
-                                    (eq? (string-contains file full-name)
-                                         0)))))
+                           (not (eq? (string-contains file name) 0))))
                         (_
                          ;; This must be an <origin> or something like that.
                          #f))

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 03/13] lint: Rewrite 'check-patch-file-names'.
  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-24 20:19 ` [PATCH 02/13] lint: Remove an unneeded clause in 'check-patch-file-names' Mathieu Lirzin
@ 2016-01-24 20:19 ` 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
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* guix/scripts/lint.scm (check-patch-file-names): Improve clarity by
reversing the logic.
---
 guix/scripts/lint.scm | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-lint-Rewrite-check-patch-file-names.patch --]
[-- Type: text/x-patch; name="0003-lint-Rewrite-check-patch-file-names.patch", Size: 2054 bytes --]

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 25f49a7..e729398 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -413,24 +413,21 @@ warning for PACKAGE mentionning the FIELD."
 (define (check-patch-file-names package)
   "Emit a warning if the patches requires by PACKAGE are badly named or if the
 patch could not be found."
-  (guard (c ((message-condition? c)               ;raised by 'search-patch'
+  (guard (c ((message-condition? c)     ;raised by 'search-patch'
              (emit-warning package (condition-message c)
                            'patch-file-names)))
-    (let ((patches   (and=> (package-source package) origin-patches))
-          (name      (package-name package)))
-      (when (and patches
-                 (any (match-lambda
-                        ((? string? patch)
-                         (let ((file (basename patch)))
-                           (not (eq? (string-contains file name) 0))))
-                        (_
-                         ;; This must be an <origin> or something like that.
-                         #f))
-                      patches))
-        (emit-warning package
-                      (_ "file names of patches should start with \
-the package name")
-                      'patch-file-names)))))
+    (unless (every (match-lambda        ;patch starts with package name?
+                     ((? string? patch)
+                      (and=> (string-contains (basename patch)
+                                              (package-name package))
+                             zero?))
+                     (_  #f))     ;must be an <origin> or something like that.
+                   (or (and=> (package-source package) origin-patches)
+                       '()))
+      (emit-warning
+       package
+       (_ "file names of patches should start with the package name")
+       'patch-file-names))))
 
 (define (escape-quotes str)
   "Replace any quote character in STR by an escaped quote character."

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (2 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 03/13] lint: Rewrite 'check-patch-file-names' Mathieu Lirzin
@ 2016-01-24 20:19 ` Mathieu Lirzin
  2016-01-25 11:37   ` Alex Kost
  2016-01-25 14:04   ` Thompson, David
  2016-01-24 20:19 ` [PATCH 05/13] packages: Use '@' in package record printers Mathieu Lirzin
                   ` (8 subsequent siblings)
  12 siblings, 2 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


Fixes <http://bugs.gnu.org/19219>.

* guix/build/utils.scm (package-name->name+version): Use '@' for
separating package names and version numbers instead of '-'.  This
provides the ability to use numbers in package names.
* guix/packages.scm (package-full-name): Add an optional SEPARATOR
argument defaulting to "@".
* doc/guix.texi (Invoking guix package, Invoking guix import): Adapt to
the new syntax.
* guix/ui.scm (package-specification->name+version+output): Likewise.
* guix/scripts/import/hackage.scm (show-help): Likewise.
* gnu/packages.scm (check-package-freshness, specification->package)
(specification->package+output): Likewise.
* emacs/guix-base.scm (guix-package-name-specification): Likewise.
* emacs/guix-main.scm (full-name->name+version)
(name+version->full-name): Likewise.
* tests/guix-build.sh: Likewise.
* tests/guix-lint.sh: Likewise.
* tests/guix-package.sh: Likewise.
* tests/packages.scm: Likewise.
* tests/ui.scm: Likewise.
* tests/utils.scm: Likewise.
* tests/graph.scm ("bag-emerged DAG"): Use 'package-full-name' optional
SEPARATOR argument.
* gnu/packages/commencement.scm (gcc-boot0): Likewise.
* NEWS: Mention new syntax.
---
 NEWS                            | 13 +++++++++++++
 doc/guix.texi                   | 12 ++++++------
 emacs/guix-base.el              |  2 +-
 emacs/guix-main.scm             |  4 ++--
 gnu/packages.scm                | 10 +++++-----
 gnu/packages/commencement.scm   |  2 +-
 guix/build/utils.scm            | 25 +++++++------------------
 guix/packages.scm               |  9 ++++++---
 guix/scripts/import/hackage.scm |  2 +-
 guix/ui.scm                     |  4 ++--
 tests/graph.scm                 |  2 +-
 tests/guix-build.sh             |  4 ++--
 tests/guix-lint.sh              |  2 +-
 tests/guix-package.sh           |  4 ++--
 tests/ui.scm                    |  6 +++---
 tests/utils.scm                 |  4 ++--
 16 files changed, 55 insertions(+), 50 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0004-utils-Use-for-separating-package-names-and-version-n.patch --]
[-- Type: text/x-patch; name="0004-utils-Use-for-separating-package-names-and-version-n.patch", Size: 15128 bytes --]

diff --git a/NEWS b/NEWS
index 0084394..ed45ab4 100644
--- a/NEWS
+++ b/NEWS
@@ -14,17 +14,25 @@ Please send Guix bug reports to bug-guix@gnu.org.
 
 ** Package management
 
+*** New syntax for separating package names and version numbers
+
+Use ‘@’ instead of ‘-’ as a separator.  This new separator is a reserved
+character which is not allowed both in package names and version numbers.
+
 *** Emacs interface for system generations
 *** Emacs interface for hydra.gnu.org
 *** Changes in Emacs interface variables
+
 In the following names, BUFFER-TYPE means "info" or "list";
 ENTRY-TYPE means "package", "output" or "generation".
 
 **** Removed
+
 - guix-info-fill-column
 - guix-info-insert-ENTRY-TYPE-function
 
 **** Renamed
+
 - guix-info-ignore-empty-vals -> guix-info-ignore-empty-values
 - guix-output-name-width -> guix-generation-output-name-width
 - guix-buffer-name-function -> guix-ui-buffer-name-function
@@ -32,6 +40,7 @@ ENTRY-TYPE means "package", "output" or "generation".
 - guix-search-params -> guix-package-search-params
 
 **** Replaced
+
 - guix-list-column-format, guix-list-column-value-methods ->
   guix-ENTRY-TYPE-list-format
 - guix-info-displayed-params, guix-info-insert-methods,
@@ -42,6 +51,10 @@ ENTRY-TYPE means "package", "output" or "generation".
   guix-ENTRY-TYPE-list-describe-warning-count
 - guix-package-info-fill-heading -> guix-info-fill
 
+** Noteworthy bug fixes
+
+*** Numbers in package names are correctly handled (http://bugs.gnu.org/19219)
+
 * Changes in 0.9.0 (since 0.8.3)
 
 ** Package management
diff --git a/doc/guix.texi b/doc/guix.texi
index 4ce6ef5..1173d94 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13,7 +13,7 @@
 Copyright @copyright{} 2012, 2013, 2014, 2015, 2016 Ludovic Courtès@*
 Copyright @copyright{} 2013, 2014 Andreas Enge@*
 Copyright @copyright{} 2013 Nikita Karetnikov@*
-Copyright @copyright{} 2015 Mathieu Lirzin@*
+Copyright @copyright{} 2015, 2016 Mathieu Lirzin@*
 Copyright @copyright{} 2014 Pierre-Antoine Rault@*
 Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer
 Copyright @copyright{} 2015 Leo Famulari
@@ -1244,14 +1244,14 @@ The @var{options} can be among the following:
 Install the specified @var{package}s.
 
 Each @var{package} may specify either a simple package name, such as
-@code{guile}, or a package name followed by a hyphen and version number,
-such as @code{guile-1.8.8} or simply @code{guile-1.8} (in the latter
+@code{guile}, or a package name followed by an at-sign and version number,
+such as @code{guile@@1.8.8} or simply @code{guile@@1.8} (in the latter
 case, the newest version prefixed by @code{1.8} is selected.)
 
 If no version number is specified, the
 newest available version will be selected.  In addition, @var{package}
 may contain a colon, followed by the name of one of the outputs of the
-package, as in @code{gcc:doc} or @code{binutils-2.22:lib}
+package, as in @code{gcc:doc} or @code{binutils@@2.22:lib}
 (@pxref{Packages with Multiple Outputs}).  Packages with a corresponding
 name (and optionally version) are searched for among the GNU
 distribution modules (@pxref{Package Modules}).
@@ -4390,10 +4390,10 @@ guix import hackage -t -e "'((\"network-uri\" . false))" HTTP
 @end example
 
 A specific package version may optionally be specified by following the
-package name by a hyphen and a version number as in the following example:
+package name by an at-sign and a version number as in the following example:
 
 @example
-guix import hackage mtl-2.1.3.1
+guix import hackage mtl@@2.1.3.1
 @end example
 
 @item elpa
diff --git a/emacs/guix-base.el b/emacs/guix-base.el
index d720a87..6f13c0f 100644
--- a/emacs/guix-base.el
+++ b/emacs/guix-base.el
@@ -43,7 +43,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 236c882..ffb873e 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
diff --git a/gnu/packages.scm b/gnu/packages.scm
index b309a78..3a32442 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -327,7 +327,7 @@ it."
                           (_ "looking for the latest release of GNU ~a...") name)
             ((? upstream-source? source)
              (let ((latest-version
-                    (string-append (upstream-source-package source) "-"
+                    (string-append (upstream-source-package source) "@"
                                    (upstream-source-version source))))
               (when (version>? latest-version full-name)
                 (format (current-error-port)
@@ -345,8 +345,8 @@ but ~a is available upstream~%")
 
 (define (specification->package spec)
   "Return a package matching SPEC.  SPEC may be a package name, or a package
-name followed by a hyphen and a version number.  If the version number is not
-present, return the preferred newest version."
+name followed by an at-sign and a version number.  If the version number is
+not present, return the preferred newest version."
   (let-values (((name version)
                 (package-name->name+version spec)))
     (match (find-best-packages-by-name name version)
@@ -369,9 +369,9 @@ present, return the preferred newest version."
 optionally contain a version number and an output name, as in these examples:
 
   guile
-  guile-2.0.9
+  guile@2.0.9
   guile:debug
-  guile-2.0.9:debug
+  guile@2.0.9:debug
 
 If SPEC does not specify a version number, return the preferred newest
 version; if SPEC does not specify an output, return OUTPUT."
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 73b27a2..f2a43fa 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -227,7 +227,7 @@
                             ;; Drop trailing letters, as gmp-6.0.0a unpacks
                             ;; into gmp-6.0.0.
                             `(symlink ,(string-trim-right
-                                        (package-full-name lib)
+                                        (package-full-name lib "-")
                                         char-set:letter)
                                       ,(package-name lib)))
                           (list gmp mpfr mpc))))
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index e3f9edc..e899e77 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -100,25 +101,13 @@ is typically a \"PACKAGE-VERSION\" string."
                (+ 34 (string-length (%store-directory)))))
 
 (define (package-name->name+version name)
-  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
-\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
-#f are returned.  The first hyphen followed by a digit is considered to
-introduce the version part."
+  "Given NAME, a package name like \"foo@0.9.1b\", return two values: \"foo\"
+and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
+returned.  Both parts must not contain any '@'."
   ;; See also `DrvName' in Nix.
-
-  (define number?
-    (cut char-set-contains? char-set:digit <>))
-
-  (let loop ((chars   (string->list name))
-             (prefix '()))
-    (match chars
-      (()
-       (values name #f))
-      ((#\- (? number? n) rest ...)
-       (values (list->string (reverse prefix))
-               (list->string (cons n rest))))
-      ((head tail ...)
-       (loop tail (cons head prefix))))))
+  (match (string-split name #\@)
+    ((name version) (values name version))
+    (_              (values name #f))))
 
 (define parallel-job-count
   ;; Number of processes to be passed next to GNU Make's `-j' argument.
diff --git a/guix/packages.scm b/guix/packages.scm
index 41f3e20..c43b36f 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;;
@@ -342,9 +343,11 @@ name of its URI."
   package-cross-build-system-error?)
 
 
-(define (package-full-name package)
-  "Return the full name of PACKAGE--i.e., `NAME-VERSION'."
-  (string-append (package-name package) "-" (package-version package)))
+(define* (package-full-name package #:optional (separator "@"))
+  "Return a string which is the concatenation of PACKAGE name, SEPARATOR, and
+PACKAGE version.  SEPARATOR is a optional argument defaulting to \"@\".
+PACKAGE must be a <package> record."
+  (string-append (package-name package) separator (package-version package)))
 
 (define (%standard-patch-inputs)
   (let* ((canonical (module-ref (resolve-interface '(gnu packages base))
diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm
index 4e84278..f2c2002 100644
--- a/guix/scripts/import/hackage.scm
+++ b/guix/scripts/import/hackage.scm
@@ -46,7 +46,7 @@
 (define (show-help)
   (display (_ "Usage: guix import hackage PACKAGE-NAME
 Import and convert the Hackage package for PACKAGE-NAME.  If PACKAGE-NAME
-includes a suffix constituted by a dash followed by a numerical version (as
+includes a suffix constituted by a at-sign followed by a numerical version (as
 used with Guix packages), then a definition for the specified version of the
 package will be generated.  If no version suffix is pecified, then the
 generated package definition will correspond to the latest available
diff --git a/guix/ui.scm b/guix/ui.scm
index 6fd16bb..3778851 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1079,9 +1079,9 @@ package name, version number (or #f), and output name (or OUTPUT).  SPEC may
 optionally contain a version number and an output name, as in these examples:
 
   guile
-  guile-2.0.9
+  guile@2.0.9
   guile:debug
-  guile-2.0.9:debug
+  guile@2.0.9:debug
 "
   (let*-values (((name sub-drv)
                  (match (string-rindex spec #\:)
diff --git a/tests/graph.scm b/tests/graph.scm
index 4f85432..dd5ebcf 100644
--- a/tests/graph.scm
+++ b/tests/graph.scm
@@ -113,7 +113,7 @@ edges."
                      (map (lambda (destination)
                             (list "p-0.drv"
                                   (string-append
-                                   (package-full-name destination)
+                                   (package-full-name destination "-")
                                    ".drv")))
                           implicit)))))))
 
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index f7fb3c5..82900ad 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -149,8 +149,8 @@ guix build coreutils --target=mips64el-linux-gnu --dry-run --no-substitutes
 
 # Parsing package names and versions.
 guix build -n time		# PASS
-guix build -n time-1.7		# PASS, version found
-if guix build -n time-3.2;	# FAIL, version not found
+guix build -n time@1.7		# PASS, version found
+if guix build -n time@3.2;	# FAIL, version not found
 then false; else true; fi
 if guix build -n something-that-will-never-exist; # FAIL
 then false; else true; fi
diff --git a/tests/guix-lint.sh b/tests/guix-lint.sh
index 5015b5c..c105521 100644
--- a/tests/guix-lint.sh
+++ b/tests/guix-lint.sh
@@ -75,4 +75,4 @@ if guix lint -c synopsis,invalid-checker dummy 2>&1 | \
 then true; else false; fi
 
 # Make sure specifying multiple packages works.
-guix lint -c inputs-should-be-native dummy dummy-42 dummy
+guix lint -c inputs-should-be-native dummy dummy@42 dummy
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index cf1a185..273a011 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -207,13 +207,13 @@ cat > "$module_dir/foo.scm"<<EOF
 EOF
 
 guix package -A emacs-foo-bar -L "$module_dir" | grep 42
-guix package -i emacs-foo-bar-42 -n -L "$module_dir"
+guix package -i emacs-foo-bar@42 -n -L "$module_dir"
 
 # Same thing using the 'GUIX_PACKAGE_PATH' environment variable.
 GUIX_PACKAGE_PATH="$module_dir"
 export GUIX_PACKAGE_PATH
 guix package -A emacs-foo-bar | grep 42
-guix package -i emacs-foo-bar-42 -n
+guix package -i emacs-foo-bar@42 -n
 
 # Make sure patches that live under $GUIX_PACKAGE_PATH are found.
 cat > "$module_dir/emacs.patch"<<EOF
diff --git a/tests/ui.scm b/tests/ui.scm
index bd4c907..f28e623 100644
--- a/tests/ui.scm
+++ b/tests/ui.scm
@@ -108,10 +108,10 @@ Second line" 24))
                (package-specification->name+version+output spec))
            list))
        '("guile"
-         "guile-2.0.9"
+         "guile@2.0.9"
          "guile:debug"
-         "guile-2.0.9:debug"
-         "guile-cairo-1.4.1")))
+         "guile@2.0.9:debug"
+         "guile-cairo@1.4.1")))
 
 (test-equal "integer"
   '(1)
diff --git a/tests/utils.scm b/tests/utils.scm
index a05faab..ac622ee 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -59,14 +59,14 @@
           ((name version)
            (let*-values (((full-name)
                           (if version
-                              (string-append name "-" version)
+                              (string-append name "@" version)
                               name))
                          ((name* version*)
                           (package-name->name+version full-name)))
              (and (equal? name* name)
                   (equal? version* version)))))
          '(("foo" "0.9.1b")
-           ("foo-bar" "1.0")
+           ("foo-14-bar" "320")
            ("foo-bar2" #f)
            ("guile" "2.0.6.65-134c9") ; as produced by `git-version-gen'
            ("nixpkgs" "1.0pre22125_a28fe19")

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 05/13] packages: Use '@' in package record printers.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (3 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 04/13] utils: Use '@' for separating package names and version numbers Mathieu Lirzin
@ 2016-01-24 20:19 ` 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
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* guix/packages.scm <package>: Use '@' in record printer.
* guix/import/cabal.scm <cabal-package>: Likewise
* guix/import/elpa.scm <elpa-package>: Likewise.
* tests/packages.scm: Adapt to it.
---
 guix/import/cabal.scm | 2 +-
 guix/import/elpa.scm  | 2 +-
 guix/packages.scm     | 2 +-
 tests/packages.scm    | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0005-packages-Use-in-package-record-printers.patch --]
[-- Type: text/x-patch; name="0005-packages-Use-in-package-record-printers.patch", Size: 2621 bytes --]

diff --git a/guix/import/cabal.scm b/guix/import/cabal.scm
index c20e074..09130e4 100644
--- a/guix/import/cabal.scm
+++ b/guix/import/cabal.scm
@@ -608,7 +608,7 @@ If #f use the function 'port-filename' to obtain it."
 
 (set-record-type-printer! <cabal-package>
                           (lambda (package port)
-                            (format port "#<cabal-package ~a-~a>"
+                            (format port "#<cabal-package ~a@~a>"
                                       (cabal-package-name package)
                                       (cabal-package-version package))))
 
diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
index 8c10668..529de4f 100644
--- a/guix/import/elpa.scm
+++ b/guix/import/elpa.scm
@@ -121,7 +121,7 @@ REPO."
 
 (set-record-type-printer! <elpa-package>
                           (lambda (package port)
-                            (format port "#<elpa-package ~a-~a>"
+                            (format port "#<elpa-package ~a@~a>"
                                       (elpa-package-name package)
                                       (elpa-package-version package))))
 
diff --git a/guix/packages.scm b/guix/packages.scm
index c43b36f..48c012a 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -279,7 +279,7 @@ name of its URI."
                           (lambda (package port)
                             (let ((loc    (package-location package))
                                   (format simple-format))
-                              (format port "#<package ~a-~a ~a~a>"
+                              (format port "#<package ~a@~a ~a~a>"
                                       (package-name package)
                                       (package-version package)
                                       (if loc
diff --git a/tests/packages.scm b/tests/packages.scm
index 6a2f4f0..9d37fb6 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -58,7 +58,7 @@
 (test-begin "packages")
 
 (test-assert "printer with location"
-  (string-match "^#<package foo-0 foo.scm:42 [[:xdigit:]]+>$"
+  (string-match "^#<package foo@0 foo.scm:42 [[:xdigit:]]+>$"
                 (with-output-to-string
                   (lambda ()
                     (write
@@ -66,7 +66,7 @@
                        (location (make-location "foo.scm" 42 7))))))))
 
 (test-assert "printer without location"
-  (string-match "^#<package foo-0 [[:xdigit:]]+>$"
+  (string-match "^#<package foo@0 [[:xdigit:]]+>$"
                 (with-output-to-string
                   (lambda ()
                     (write

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (4 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 05/13] packages: Use '@' in package record printers Mathieu Lirzin
@ 2016-01-24 20:19 ` Mathieu Lirzin
  2016-01-26 16:52   ` Ludovic Courtès
  2016-01-24 20:19 ` [PATCH 07/13] build: Add 'DL' silent rule Mathieu Lirzin
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


This improves compilation speed since scripts are not compiled twice.
When building with ‘make -j4‘ from a clean repository on an Intel
i5-2540M, the time of compilation gets from:

real	5m7.220s
user	18m49.788s
sys	0m12.964s

down to:

real	2m20.820s
user	7m25.992s
sys	0m7.464s

* configure.ac (BUILD_FROM_GIT): New Automake conditional.
* doc.am (SUBCOMMANDS): Delete variable.
(dist_man1_MANS): List all subcommands man pages.
(doc/guix.1): Build only if BUILD_FROM_GIT.  Depend on 'scripts/guix'
instead of all subcommands.
[BUILD_DAEMON] (doc/guix-daemon): Likewise.  Replace the
'nix/nix-daemon/guix-daemon.cc' prerequisite with 'guix-daemon'.
[BUILD_FROM_GIT] (gen_man): New variable.
[BUILD_FROM_GIT] (doc/guix-%.1): New target.
(CLEANFILES) [BUILD_FROM_GIT]: Add $(dist_man1_MANS).
---
 configure.ac |  4 +++
 doc.am       | 90 +++++++++++++++++++++++++++++-------------------------------
 2 files changed, 47 insertions(+), 47 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0006-build-Generate-man-pages-after-compiling-guile-objec.patch --]
[-- Type: text/x-patch; name="0006-build-Generate-man-pages-after-compiling-guile-objec.patch", Size: 3378 bytes --]

diff --git a/configure.ac b/configure.ac
index f61c04c..0bd9144 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,6 +198,10 @@ AC_CACHE_SAVE
 
 m4_include([config-daemon.ac])
 
+dnl Are we building from git checked-out sources, or a tarball ?  This allows
+dnl specifying some rules used only when bootstrapping.
+AM_CONDITIONAL([BUILD_FROM_GIT], [test -d "$srcdir/.git"])
+
 dnl `dot' (from the Graphviz package) is only needed for maintainers.
 dnl See `Building from Git' in the manual for more info.
 AM_MISSING_PROG([DOT], [dot])
diff --git a/doc.am b/doc.am
index f15efcc..9214405 100644
--- a/doc.am
+++ b/doc.am
@@ -2,6 +2,7 @@
 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
 # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
+# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -91,55 +92,50 @@ ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps)		\
 	  $(top_srcdir)/doc/images/coreutils-size-map.eps
 dvi-local: ps-local
 
-\f
-# Manual pages.
-
-doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
-	-LANGUAGE= $(top_builddir)/pre-inst-env	\
-	  $(HELP2MAN) --output="$@" guix
-
-# Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
-# for people building from a tarball.
-doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
-	-LANGUAGE= $(top_builddir)/pre-inst-env	\
-	  $(HELP2MAN) --output="$@" guix-daemon
-
-define subcommand-manual-target
-
-doc/guix-$(1).1: guix/scripts/$(1).scm
-	-LANGUAGE= $(top_builddir)/pre-inst-env		\
-	  $(HELP2MAN) --output="$$@" "guix $(1)"
-
-endef
-
-SUBCOMMANDS :=					\
-  archive					\
-  build						\
-  challenge					\
-  download					\
-  edit						\
-  environment					\
-  gc						\
-  hash						\
-  import					\
-  lint						\
-  package					\
-  publish					\
-  pull						\
-  refresh					\
-  size						\
-  system
-
-$(eval $(foreach subcommand,$(SUBCOMMANDS),			\
-          $(call subcommand-manual-target,$(subcommand))))
-
-dist_man1_MANS =				\
-  doc/guix.1					\
-  $(SUBCOMMANDS:%=doc/guix-%.1)
+## ------------ ##
+##  Man pages.  ##
+## ------------ ##
+
+# The man pages are generated using 'help2man'.
+dist_man1_MANS = 			\
+  doc/guix.1				\
+  doc/guix-archive.1			\
+  doc/guix-build.1			\
+  doc/guix-challenge.1			\
+  doc/guix-download.1			\
+  doc/guix-edit.1			\
+  doc/guix-environment.1		\
+  doc/guix-gc.1				\
+  doc/guix-hash.1			\
+  doc/guix-import.1			\
+  doc/guix-lint.1			\
+  doc/guix-package.1			\
+  doc/guix-publish.1			\
+  doc/guix-pull.1			\
+  doc/guix-refresh.1			\
+  doc/guix-size.1			\
+  doc/guix-system.1
 
 if BUILD_DAEMON
+dist_man1_MANS += doc/guix-daemon.1
+endif
+
+# Avoid re-generating the man pages when building from tarballs.
+if BUILD_FROM_GIT
+
+gen_man = LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)
+
+doc/guix.1: scripts/guix
+	  $(gen_man) --output="$@" `basename $<`
 
-dist_man1_MANS +=				\
-  doc/guix-daemon.1
+doc/guix-%.1: guix/scripts/%.go
+	  $(gen_man) --output="$@"  "guix `basename $< .go`"
 
+if BUILD_DAEMON
+doc/guix-daemon.1: guix-daemon
+	  $(gen_man) --output="$@" "$<"
 endif
+
+CLEANFILES += $(dist_man1_MANS)
+
+endif BUILD_FROM_GIT

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 07/13] build: Add 'DL' silent rule.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (5 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 06/13] build: Generate man pages after compiling guile objects Mathieu Lirzin
@ 2016-01-24 20:19 ` Mathieu Lirzin
  2016-01-26 16:28   ` Ludovic Courtès
  2016-01-24 20:19 ` [PATCH 08/13] build: Add 'DOT' " Mathieu Lirzin
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* Makefile.am (AM_V_DL, AM_V_DL_, AM_V_DL_0): New variables.
* gnu-system.am (gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz)
(gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz)
(gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz)
(gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz): Use $(AM_V_DL).
---
 Makefile.am   | 10 ++++++++++
 gnu-system.am | 21 +++++++++++++--------
 2 files changed, 23 insertions(+), 8 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0007-build-Add-DL-silent-rule.patch --]
[-- Type: text/x-patch; name="0007-build-Add-DL-silent-rule.patch", Size: 2851 bytes --]

diff --git a/Makefile.am b/Makefile.am
index 1ede6d4..754c19a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,7 @@
 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
 # Copyright © 2015 Alex Kost <alezost@gmail.com>
+# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -471,3 +472,12 @@ assert-final-inputs-self-contained:
 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go
 .PHONY: assert-no-store-file-names assert-binaries-available
 .PHONY: assert-final-inputs-self-contained
+
+## -------------- ##
+## Silent rules.  ##
+## -------------- ##
+
+AM_V_DL = $(AM_V_DL_$(V))
+AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
+AM_V_DL_0 = @echo "  DL      " $@;
+
diff --git a/gnu-system.am b/gnu-system.am
index 3426056..a3d43e1 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -1,6 +1,7 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
+# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 # Copyright © 2013, 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
 #
 # This file is part of GNU Guix.
@@ -808,14 +809,18 @@ DOWNLOAD_FILE =								\
            "$(top_srcdir)/build-aux/download.scm"
 
 gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0"
+	$(AM_V_DL)$(MKDIR_P) `dirname "$@"`;			\
+	$(AM_V_P) && fd=1 || fd=- ; $(DOWNLOAD_FILE) "$@"	\
+	  "037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0" >&$$fd
 gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846"
+	$(AM_V_DL)$(MKDIR_P) `dirname "$@"`;	\
+	$(AM_V_P) && fd=1 || fd=- ; $(DOWNLOAD_FILE) "$@"	\
+	  "b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846" >&$$fd
 gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6"
+	$(AM_V_DL)$(MKDIR_P) `dirname "$@"`;	\
+	$(AM_V_P) && fd=1 || fd=- ; $(DOWNLOAD_FILE) "$@"	\
+	  "e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6" >&$$fd
 gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz:
-	$(MKDIR_P) `dirname "$@"`
-	$(DOWNLOAD_FILE) "$@" "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b"
+	$(AM_V_DL)$(MKDIR_P) `dirname "$@"`;	\
+	$(AM_V_P) && fd=1 || fd=- ; $(DOWNLOAD_FILE) "$@"	\
+	  "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b" >&$$fd

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 08/13] build: Add 'DOT' silent rule.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (6 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 07/13] build: Add 'DL' silent rule Mathieu Lirzin
@ 2016-01-24 20:19 ` Mathieu Lirzin
  2016-01-26 16:28   ` Ludovic Courtès
  2016-01-24 20:19 ` [PATCH 09/13] build: Add 'EMACS' " Mathieu Lirzin
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* Makefile.am (AM_V_DOT, AM_V_DOT_, AM_V_DOT_0): New variables.
* doc.am (.dot.png, .dot.pdf, .dot.eps): Use $(AM_V_DOT).
---
 Makefile.am | 4 ++++
 doc.am      | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0008-build-Add-DOT-silent-rule.patch --]
[-- Type: text/x-patch; name="0008-build-Add-DOT-silent-rule.patch", Size: 1111 bytes --]

diff --git a/Makefile.am b/Makefile.am
index 754c19a..4c71a12 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -481,3 +481,7 @@ AM_V_DL = $(AM_V_DL_$(V))
 AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
 AM_V_DL_0 = @echo "  DL      " $@;
 
+AM_V_DOT = $(AM_V_DOT_$(V))
+AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
+AM_V_DOT_0 = @echo "  DOT     " $@;
+
diff --git a/doc.am b/doc.am
index 9214405..9e95349 100644
--- a/doc.am
+++ b/doc.am
@@ -68,15 +68,15 @@ DOT_OPTIONS =					\
   -Nfontsize=9 -Nheight=.1 -Nwidth=.1
 
 .dot.png:
-	$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	$(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
 	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.pdf:
-	$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	$(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
 	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .dot.eps:
-	$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
+	$(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
 	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .png.eps:

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 09/13] build: Add 'EMACS' silent rule.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (7 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 08/13] build: Add 'DOT' " Mathieu Lirzin
@ 2016-01-24 20:19 ` Mathieu Lirzin
  2016-01-26 16:28   ` Ludovic Courtès
  2016-01-24 20:19 ` [PATCH 10/13] build: Add 'HELP2MAN' " Mathieu Lirzin
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* Makefile.am (AM_V_EMACS, AM_V_EMACS_, AM_V_EMACS_0): New variables.
* emacs.am [HAVE_EMACS] ($(AUTOLOADS)): Use $(AM_V_EMACS).
---
 Makefile.am | 4 ++++
 emacs.am    | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0009-build-Add-EMACS-silent-rule.patch --]
[-- Type: text/x-patch; name="0009-build-Add-EMACS-silent-rule.patch", Size: 1042 bytes --]

diff --git a/Makefile.am b/Makefile.am
index 4c71a12..d29a49d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -485,3 +485,7 @@ AM_V_DOT = $(AM_V_DOT_$(V))
 AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
 AM_V_DOT_0 = @echo "  DOT     " $@;
 
+AM_V_EMACS = $(AM_V_EMACS_$(V))
+AM_V_EMACS_ = $(AM_V_EMACS_$(AM_DEFAULT_VERBOSITY))
+AM_V_EMACS_0 = @echo "  EMACS   " $@;
+
diff --git a/emacs.am b/emacs.am
index d0d4dfb..0342574 100644
--- a/emacs.am
+++ b/emacs.am
@@ -1,5 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
+# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -59,7 +60,7 @@ dist_lisp_DATA =				\
 nodist_lisp_DATA = emacs/guix-config.el
 
 $(AUTOLOADS): $(ELFILES)
-	$(EMACS) --batch --eval						\
+	$(AM_V_EMACS)$(EMACS) --batch --eval				\
 	  "(let ((backup-inhibited t)					\
 	         (generated-autoload-file				\
 	          (expand-file-name \"$(AUTOLOADS)\" \"$(srcdir)\")))	\

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 10/13] build: Add 'HELP2MAN' silent rule.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (8 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 09/13] build: Add 'EMACS' " Mathieu Lirzin
@ 2016-01-24 20:19 ` 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
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* Makefile.am (AM_V_HELP2MAN, AM_V_HELP2MAN_, AM_V_HELP2MAN_0): New
variables.
* doc.am [BUILD_FROM_GIT] (gen_man): Use $(AM_V_EMACS).
---
 Makefile.am | 3 +++
 doc.am      | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0010-build-Add-HELP2MAN-silent-rule.patch --]
[-- Type: text/x-patch; name="0010-build-Add-HELP2MAN-silent-rule.patch", Size: 824 bytes --]

diff --git a/Makefile.am b/Makefile.am
index d29a49d..bc015e2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -489,3 +489,6 @@ AM_V_EMACS = $(AM_V_EMACS_$(V))
 AM_V_EMACS_ = $(AM_V_EMACS_$(AM_DEFAULT_VERBOSITY))
 AM_V_EMACS_0 = @echo "  EMACS   " $@;
 
+AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
+AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
+AM_V_HELP2MAN_0 = @echo "  HELP2MAN" $@;
diff --git a/doc.am b/doc.am
index 9e95349..73db930 100644
--- a/doc.am
+++ b/doc.am
@@ -123,7 +123,7 @@ endif
 # Avoid re-generating the man pages when building from tarballs.
 if BUILD_FROM_GIT
 
-gen_man = LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)
+gen_man = $(AM_V_HELP2MAN)LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)
 
 doc/guix.1: scripts/guix
 	  $(gen_man) --output="$@" `basename $<`

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 11/13] build: Delete emacs/guix-autoloads.el when 'make clean'.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (9 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 10/13] build: Add 'HELP2MAN' " Mathieu Lirzin
@ 2016-01-24 20:19 ` Mathieu Lirzin
  2016-01-26 16:33   ` Ludovic Courtès
  2016-01-24 20:19 ` [PATCH 12/13] build: Use 'GEN' and 'at' silent rules Mathieu Lirzin
  2016-01-24 20:19 ` [PATCH 13/13] Update .gitignore Mathieu Lirzin
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* emacs.am (CLEANFILES) [HAVE_EMACS]: Add $(AUTOLOADS).
---
 emacs.am | 2 ++
 1 file changed, 2 insertions(+)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0011-build-Delete-emacs-guix-autoloads.el-when-make-clean.patch --]
[-- Type: text/x-patch; name="0011-build-Delete-emacs-guix-autoloads.el-when-make-clean.patch", Size: 291 bytes --]

diff --git a/emacs.am b/emacs.am
index 0342574..37cf183 100644
--- a/emacs.am
+++ b/emacs.am
@@ -67,4 +67,6 @@ $(AUTOLOADS): $(ELFILES)
 	     (update-directory-autoloads				\
 	      (expand-file-name \"emacs\" \"$(srcdir)\")))"
 
+CLEANFILES += $(AUTOLOADS)
+
 endif HAVE_EMACS

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 12/13] build: Use 'GEN' and 'at' silent rules.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (10 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 11/13] build: Delete emacs/guix-autoloads.el when 'make clean' Mathieu Lirzin
@ 2016-01-24 20:19 ` Mathieu Lirzin
  2016-01-26 16:34   ` Ludovic Courtès
  2016-01-24 20:19 ` [PATCH 13/13] Update .gitignore Mathieu Lirzin
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* daemon.am (nix/libstore/schema.sql.hh, etc/guix-daemon.service)
(etc/guix-daemon.conf): Use $(AM_V_GEN).
* doc.am (doc/os-config-%.texi, .png.eps): Likewise.
* Makefile.am (guix-binary.%.tar.xz, gen-ChangeLog, gen-AUTHORS):
Likewise.
(assert-binaries-available, assert-final-inputs-self-contained)
(assert-no-store-file-names, sync-descriptions): Use $(AM_V_at).
---
 Makefile.am | 14 +++++++-------
 daemon.am   | 11 ++++++-----
 doc.am      |  4 ++--
 3 files changed, 15 insertions(+), 14 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0012-build-Use-GEN-and-at-silent-rules.patch --]
[-- Type: text/x-patch; name="0012-build-Use-GEN-and-at-silent-rules.patch", Size: 4469 bytes --]

diff --git a/Makefile.am b/Makefile.am
index bc015e2..6784da0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -420,7 +420,7 @@ include emacs.am
 
 # The self-contained tarball.
 guix-binary.%.tar.xz:
-	-GUIX_PACKAGE_PATH= \
+	$(AM_V_GEN)GUIX_PACKAGE_PATH= \
 	$(top_builddir)/pre-inst-env "$(GUILE)"			\
 	  "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
 
@@ -431,11 +431,11 @@ dist-hook: assert-no-store-file-names
 distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
 
 sync-descriptions:
-	-GUIX_PACKAGE_PATH= \
+	$(AM_V_at)GUIX_PACKAGE_PATH= \
 	 $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
 
 gen-ChangeLog:
-	if test -d .git; then				\
+	$(AM_V_GEN)if test -d .git; then		\
 	  $(top_srcdir)/build-aux/gitlog-to-changelog	\
 	    > $(distdir)/cl-t;				\
 	  rm -f $(distdir)/ChangeLog;			\
@@ -443,7 +443,7 @@ gen-ChangeLog:
 	fi
 
 gen-AUTHORS:
-	if test -d .git; then					\
+	$(AM_V_GEN)if test -d .git; then			\
 	  rm -f "$(distdir)/AUTHORS";				\
 	  $(top_builddir)/pre-inst-env "$(GUILE)"		\
 	    "$(top_srcdir)/build-aux/generate-authors.scm"	\
@@ -452,7 +452,7 @@ gen-AUTHORS:
 
 # Make sure we're not shipping a file that embeds a local /gnu/store file name.
 assert-no-store-file-names:
-	if grep -r --exclude=*.texi --exclude=*.info				\
+	$(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info			\
 	     "$(storedir)/[a-z0-9]{32}-" $(distdir) ;				\
 	then									\
 	  echo "error: store file names embedded in the distribution" >&2 ;	\
@@ -461,12 +461,12 @@ assert-no-store-file-names:
 
 # Make sure hydra.gnu.org has the important binaries.
 assert-binaries-available:
-	$(top_builddir)/pre-inst-env "$(GUILE)"				\
+	$(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)"			\
 	  "$(top_srcdir)/build-aux/check-available-binaries.scm"
 
 # Make sure the final inputs don't refer to bootstrap tools.
 assert-final-inputs-self-contained:
-	$(top_builddir)/pre-inst-env "$(GUILE)"				\
+	$(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)"			\
 	  "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
 
 .PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go
diff --git a/daemon.am b/daemon.am
index ba4be50..3c15531 100644
--- a/daemon.am
+++ b/daemon.am
@@ -1,5 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -155,7 +156,7 @@ noinst_HEADERS =						\
   $(guix_daemon_headers)
 
 nix/libstore/schema.sql.hh: nix/libstore/schema.sql
-	$(GUILE) --no-auto-compile -c				\
+	$(AM_V_GEN)$(GUILE) --no-auto-compile -c		\
 	  "(use-modules (rnrs io ports))			\
 	   (call-with-output-file \"$@\"			\
 	     (lambda (out)					\
@@ -185,9 +186,9 @@ nodist_systemdservice_DATA = etc/guix-daemon.service
 
 etc/guix-daemon.service: etc/guix-daemon.service.in	\
 			 $(top_builddir)/config.status
-	$(MKDIR_P) "`dirname "$@"`"
+	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";				\
 	$(SED) -e 's|@''bindir''@|$(bindir)|' <				\
-	       "$(srcdir)/etc/guix-daemon.service.in" > "$@.tmp"
+	       "$(srcdir)/etc/guix-daemon.service.in" > "$@.tmp";	\
 	mv "$@.tmp" "$@"
 
 # The '.conf' job for Upstart.
@@ -196,9 +197,9 @@ nodist_upstartjob_DATA = etc/guix-daemon.conf
 
 etc/guix-daemon.conf: etc/guix-daemon.conf.in	\
 			 $(top_builddir)/config.status
-	$(MKDIR_P) "`dirname "$@"`"
+	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";				\
 	$(SED) -e 's|@''bindir''@|$(bindir)|' <				\
-	       "$(srcdir)/etc/guix-daemon.conf.in" > "$@.tmp"
+	       "$(srcdir)/etc/guix-daemon.conf.in" > "$@.tmp";		\
 	mv "$@.tmp" "$@"
 
 EXTRA_DIST +=					\
diff --git a/doc.am b/doc.am
index 73db930..6706682 100644
--- a/doc.am
+++ b/doc.am
@@ -53,7 +53,7 @@ EXTRA_DIST           += $(OS_CONFIG_EXAMPLES_TEXI)
 MAINTAINERCLEANFILES  = $(OS_CONFIG_EXAMPLES_TEXI)
 
 doc/os-config-%.texi: gnu/system/examples/%.tmpl
-	$(MKDIR_P) "`dirname "$@"`"
+	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
 	cp "$<" "$@"
 
 infoimagedir = $(infodir)/images
@@ -80,7 +80,7 @@ DOT_OPTIONS =					\
 	mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
 
 .png.eps:
-	convert "$<" "$@-tmp.eps"
+	$(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
 	mv "$@-tmp.eps" "$@"
 
 # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* [PATCH 13/13] Update .gitignore.
  2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
                   ` (11 preceding siblings ...)
  2016-01-24 20:19 ` [PATCH 12/13] build: Use 'GEN' and 'at' silent rules Mathieu Lirzin
@ 2016-01-24 20:19 ` Mathieu Lirzin
  2016-01-26 16:34   ` Ludovic Courtès
  12 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-24 20:19 UTC (permalink / raw)
  To: guix-devel

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


* .gitignore: Sort lines.  Use globbing for "*.{eps,pdf,png,tar.xz}"
files.
---
 .gitignore | 158 ++++++++++++++++++++++++++++---------------------------------
 1 file changed, 72 insertions(+), 86 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0013-Update-.gitignore.patch --]
[-- Type: text/x-patch; name="0013-Update-.gitignore.patch", Size: 4415 bytes --]

diff --git a/.gitignore b/.gitignore
index 098c9bb..b5bbbaa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,16 @@
-*~
-,*
-*.tmp
+*.eps
 *.go
-tmp
 *.log
+*.pdf
+*.png
+*.tar.xz
+*.tmp
+*~
+,*
+/ABOUT-NLS
+/INSTALL
+/aclocal.m4
+/autom4te.cache
 /build-aux/compile
 /build-aux/config.guess
 /build-aux/config.rpath
@@ -14,14 +21,41 @@ tmp
 /build-aux/missing
 /build-aux/test-driver
 /build-aux/texinfo.tex
-/configure
-Makefile.in
-Makefile
-/autom4te.cache
-config.cache
-/aclocal.m4
 /config.status
-/ABOUT-NLS
+/configure
+/doc/*.1
+/doc/.dirstamp
+/doc/guix.aux
+/doc/guix.cp
+/doc/guix.cps
+/doc/guix.fn
+/doc/guix.fns
+/doc/guix.info
+/doc/guix.info-[0-9]
+/doc/guix.ky
+/doc/guix.pg
+/doc/guix.toc
+/doc/guix.tp
+/doc/guix.vr
+/doc/guix.vrs
+/doc/os-config-bare-bones.texi
+/doc/os-config-desktop.texi
+/doc/stamp-vti
+/doc/version.texi
+/emacs/Makefile
+/emacs/Makefile.in
+/emacs/guix-autoloads.el
+/emacs/guix-config.el
+/emacs/guix-helper.scm
+/etc/guix-daemon.conf
+/etc/guix-daemon.service
+/guix-daemon
+/guix-register
+/guix/config.scm
+/libformat.a
+/libstore.a
+/libutil.a
+/m4/*
 /m4/ChangeLog
 /m4/gettext.m4
 /m4/iconv.m4
@@ -31,6 +65,20 @@ config.cache
 /m4/nls.m4
 /m4/po.m4
 /m4/progtest.m4
+/nix-setuid-helper
+/nix/AUTHORS
+/nix/COPYING
+/nix/config.h
+/nix/config.h.in
+/nix/nix-daemon/nix-daemon.cc
+/nix/nix-setuid-helper/nix-setuid-helper.cc
+/nix/scripts/guix-authenticate
+/nix/scripts/list-runtime-roots
+/nix/scripts/offload
+/nix/scripts/substitute
+/po/guix/*.gmo
+/po/guix/*.insert-header
+/po/guix/*.mo
 /po/guix/ChangeLog
 /po/guix/Makefile.in.in
 /po/guix/Makevars.template
@@ -39,15 +87,15 @@ config.cache
 /po/guix/boldquot.sed
 /po/guix/en@boldquot.*
 /po/guix/en@quot.*
+/po/guix/guix.pot
 /po/guix/insert-header.sin
-/po/guix/*.insert-header
 /po/guix/quot.sed
 /po/guix/remove-potcdate.sed
 /po/guix/remove-potcdate.sin
 /po/guix/stamp-po
-/po/guix/guix.pot
-/po/guix/*.mo
-/po/guix/*.gmo
+/po/packages/*.gmo
+/po/packages/*.insert-header
+/po/packages/*.mo
 /po/packages/ChangeLog
 /po/packages/Makefile.in.in
 /po/packages/Makevars.template
@@ -56,84 +104,22 @@ config.cache
 /po/packages/boldquot.sed
 /po/packages/en@boldquot.*
 /po/packages/en@quot.*
+/po/packages/guix-packages.pot
 /po/packages/insert-header.sin
-/po/packages/*.insert-header
 /po/packages/quot.sed
 /po/packages/remove-potcdate.sed
 /po/packages/remove-potcdate.sin
 /po/packages/stamp-po
-/po/packages/guix-packages.pot
-/po/packages/*.mo
-/po/packages/*.gmo
-/tests/*.trs
-/INSTALL
-/m4/*
 /pre-inst-env
-/doc/.dirstamp
-/doc/guix.info
-/doc/guix.info-[0-9]
-/doc/guix.pdf
-/doc/stamp-vti
-/doc/version.texi
-/gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz
-/gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz
-/gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz
-/gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz
-/guix/config.scm
-/nix/nix-daemon/nix-daemon.cc
-/nix/config.h
-/nix/config.h.in
-stamp-h[0-9]
-/nix/AUTHORS
-/nix/COPYING
-/libformat.a
-/libstore.a
-/libutil.a
-/guix-daemon
-/test-tmp
-/nix/scripts/list-runtime-roots
-/test-env
-/nix/nix-setuid-helper/nix-setuid-helper.cc
 /scripts/guix
-/doc/guix.aux
-/doc/guix.cp
-/doc/guix.cps
-/doc/guix.fn
-/doc/guix.fns
-/doc/guix.ky
-/doc/guix.pg
-/doc/guix.toc
-/doc/guix.tp
-/doc/guix.vr
-/doc/guix.vrs
-/nix/scripts/substitute
-/doc/images/bootstrap-graph.png
-/doc/images/bootstrap-graph.eps
-/guix-register
+/test-env
+/test-tmp
+/tests/*.trs
 GPATH
 GRTAGS
 GTAGS
-/nix-setuid-helper
-/nix/scripts/guix-authenticate
-/nix/scripts/offload
-/emacs/Makefile.in
-/emacs/Makefile
-/emacs/guix-autoloads.el
-/emacs/guix-helper.scm
-/emacs/guix-config.el
-/doc/os-config-bare-bones.texi
-/doc/os-config-desktop.texi
-/doc/*.1
-/etc/guix-daemon.service
-/etc/guix-daemon.conf
-/doc/images/bootstrap-graph.pdf
-/doc/images/coreutils-bag-graph.png
-/doc/images/coreutils-graph.png
-/doc/images/coreutils-size-map.eps
-/doc/images/service-graph.png
-/doc/images/service-graph.eps
-/doc/images/service-graph.pdf
-/doc/images/dmd-graph.png
-/doc/images/bootstrap-packages.png
-/doc/images/bootstrap-packages.eps
-/doc/images/bootstrap-packages.pdf
+Makefile
+Makefile.in
+config.cache
+stamp-h[0-9]
+tmp

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  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-25 14:04   ` Thompson, David
  1 sibling, 1 reply; 65+ messages in thread
From: Alex Kost @ 2016-01-25 11:37 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin (2016-01-24 23:19 +0300) wrote:

> Fixes <http://bugs.gnu.org/19219>.
>
> * guix/build/utils.scm (package-name->name+version): Use '@' for
> separating package names and version numbers instead of '-'.  This
> provides the ability to use numbers in package names.
> * guix/packages.scm (package-full-name): Add an optional SEPARATOR
> argument defaulting to "@".
> * doc/guix.texi (Invoking guix package, Invoking guix import): Adapt to
> the new syntax.
> * guix/ui.scm (package-specification->name+version+output): Likewise.
> * guix/scripts/import/hackage.scm (show-help): Likewise.
> * gnu/packages.scm (check-package-freshness, specification->package)
> (specification->package+output): Likewise.
> * emacs/guix-base.scm (guix-package-name-specification): Likewise.
> * emacs/guix-main.scm (full-name->name+version)
> (name+version->full-name): Likewise.
> * tests/guix-build.sh: Likewise.
> * tests/guix-lint.sh: Likewise.
> * tests/guix-package.sh: Likewise.
> * tests/packages.scm: Likewise.
> * tests/ui.scm: Likewise.
> * tests/utils.scm: Likewise.
> * tests/graph.scm ("bag-emerged DAG"): Use 'package-full-name' optional
> SEPARATOR argument.
> * gnu/packages/commencement.scm (gcc-boot0): Likewise.
> * NEWS: Mention new syntax.

Tremendous work!  How did you manage to find all these occurrences?
I know another insignificant place though :-) It's a docstring of
'guix-packages-by-name' command in "emacs/guix-ui-package.el" file.

-- 
Alex

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  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 14:04   ` Thompson, David
  2016-01-25 21:41     ` Mathieu Lirzin
  1 sibling, 1 reply; 65+ messages in thread
From: Thompson, David @ 2016-01-25 14:04 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

On Sun, Jan 24, 2016 at 3:19 PM, Mathieu Lirzin <mthl@gnu.org> wrote:
>
> Fixes <http://bugs.gnu.org/19219>.
>
> * guix/build/utils.scm (package-name->name+version): Use '@' for
> separating package names and version numbers instead of '-'.  This
> provides the ability to use numbers in package names.
> * guix/packages.scm (package-full-name): Add an optional SEPARATOR
> argument defaulting to "@".
> * doc/guix.texi (Invoking guix package, Invoking guix import): Adapt to
> the new syntax.
> * guix/ui.scm (package-specification->name+version+output): Likewise.
> * guix/scripts/import/hackage.scm (show-help): Likewise.
> * gnu/packages.scm (check-package-freshness, specification->package)
> (specification->package+output): Likewise.
> * emacs/guix-base.scm (guix-package-name-specification): Likewise.
> * emacs/guix-main.scm (full-name->name+version)
> (name+version->full-name): Likewise.
> * tests/guix-build.sh: Likewise.
> * tests/guix-lint.sh: Likewise.
> * tests/guix-package.sh: Likewise.
> * tests/packages.scm: Likewise.
> * tests/ui.scm: Likewise.
> * tests/utils.scm: Likewise.
> * tests/graph.scm ("bag-emerged DAG"): Use 'package-full-name' optional
> SEPARATOR argument.
> * gnu/packages/commencement.scm (gcc-boot0): Likewise.
> * NEWS: Mention new syntax.
> ---
>  NEWS                            | 13 +++++++++++++
>  doc/guix.texi                   | 12 ++++++------
>  emacs/guix-base.el              |  2 +-
>  emacs/guix-main.scm             |  4 ++--
>  gnu/packages.scm                | 10 +++++-----
>  gnu/packages/commencement.scm   |  2 +-
>  guix/build/utils.scm            | 25 +++++++------------------
>  guix/packages.scm               |  9 ++++++---
>  guix/scripts/import/hackage.scm |  2 +-
>  guix/ui.scm                     |  4 ++--
>  tests/graph.scm                 |  2 +-
>  tests/guix-build.sh             |  4 ++--
>  tests/guix-lint.sh              |  2 +-
>  tests/guix-package.sh           |  4 ++--
>  tests/ui.scm                    |  6 +++---
>  tests/utils.scm                 |  4 ++--
>  16 files changed, 55 insertions(+), 50 deletions(-)

Does the fact that so many files needed to be edited indicate the need
for a single specification string constructor?  If this had already
been the case, then this patch would have only needed to change 1 or 2
procedures.

That's not to say that this isn't great work!  I just think that we
could ease the maintenance burden with some refactoring.

- Dave

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-01-25 11:37   ` Alex Kost
@ 2016-01-25 20:56     ` Mathieu Lirzin
  2016-01-26 16:22       ` Ludovic Courtès
  0 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-25 20:56 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

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

Alex Kost <alezost@gmail.com> writes:

> Tremendous work!  How did you manage to find all these occurrences?

Thank you.  In fact I haven't followed any methodic step.  I have
started editing the heart of the thing (meaning
'package-name->name+version') then look where it was used. adapt the
code/docstring and so on.  Next I have used ‘M-x rgrep’ for suspicious
string like (version, "-", ...).  Finally when fixing something ‘make
check’ has helped me detecting regressions (or wrong tests).

> I know another insignificant place though :-) It's a docstring of
> 'guix-packages-by-name' command in "emacs/guix-ui-package.el" file.

I have updated my patch with this and fix the commit log.  Thanks.

--
Mathieu Lirzin


[-- Attachment #2: 0001-utils-Use-for-separating-package-names-and-version-n.patch --]
[-- Type: text/x-diff, Size: 18436 bytes --]

From 7fef43249b704db3c4d511b2f1b62428740cfa73 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Sun, 24 Jan 2016 01:54:44 +0100
Subject: [PATCH] utils: Use '@' for separating package names and version
 numbers.

Fixes <http://bugs.gnu.org/19219>.

* guix/build/utils.scm (package-name->name+version): Use '@' for
separating package names and version numbers instead of '-'.  This
provides the ability to use numbers in package names.
* guix/packages.scm (package-full-name): Add an optional SEPARATOR
argument defaulting to "@".
* doc/guix.texi (Invoking guix package, Invoking guix import): Adapt to
the new syntax.
* guix/ui.scm (package-specification->name+version+output): Likewise.
* guix/scripts/import/hackage.scm (show-help): Likewise.
* gnu/packages.scm (check-package-freshness, specification->package)
(specification->package+output): Likewise.
* emacs/guix-base.scm (guix-package-name-specification): Likewise.
* emacs/guix-main.scm (full-name->name+version)
(name+version->full-name): Likewise.
* emacs/guix-ui-package.el (guix-packages-by-name): Likewise.
* tests/guix-build.sh: Likewise.
* tests/guix-lint.sh: Likewise.
* tests/guix-package.sh: Likewise.
* tests/ui.scm ("package-specification->name+version+output"): Likewise.
* tests/utils.scm ("package-name->name+version"): Likewise.
* tests/graph.scm ("bag-emerged DAG"): Use 'package-full-name' optional
SEPARATOR argument.
* gnu/packages/commencement.scm (gcc-boot0): Likewise.
* NEWS: Mention new syntax.
---
 NEWS                            | 13 +++++++++++++
 doc/guix.texi                   | 12 ++++++------
 emacs/guix-base.el              |  2 +-
 emacs/guix-main.scm             |  4 ++--
 emacs/guix-ui-package.el        |  3 +--
 gnu/packages.scm                | 10 +++++-----
 gnu/packages/commencement.scm   |  2 +-
 guix/build/utils.scm            | 25 +++++++------------------
 guix/packages.scm               |  9 ++++++---
 guix/scripts/import/hackage.scm |  2 +-
 guix/ui.scm                     |  4 ++--
 tests/graph.scm                 |  2 +-
 tests/guix-build.sh             |  4 ++--
 tests/guix-lint.sh              |  2 +-
 tests/guix-package.sh           |  4 ++--
 tests/ui.scm                    |  6 +++---
 tests/utils.scm                 |  4 ++--
 17 files changed, 56 insertions(+), 52 deletions(-)

diff --git a/NEWS b/NEWS
index 0084394..ed45ab4 100644
--- a/NEWS
+++ b/NEWS
@@ -14,17 +14,25 @@ Please send Guix bug reports to bug-guix@gnu.org.
 
 ** Package management
 
+*** New syntax for separating package names and version numbers
+
+Use ‘@’ instead of ‘-’ as a separator.  This new separator is a reserved
+character which is not allowed both in package names and version numbers.
+
 *** Emacs interface for system generations
 *** Emacs interface for hydra.gnu.org
 *** Changes in Emacs interface variables
+
 In the following names, BUFFER-TYPE means "info" or "list";
 ENTRY-TYPE means "package", "output" or "generation".
 
 **** Removed
+
 - guix-info-fill-column
 - guix-info-insert-ENTRY-TYPE-function
 
 **** Renamed
+
 - guix-info-ignore-empty-vals -> guix-info-ignore-empty-values
 - guix-output-name-width -> guix-generation-output-name-width
 - guix-buffer-name-function -> guix-ui-buffer-name-function
@@ -32,6 +40,7 @@ ENTRY-TYPE means "package", "output" or "generation".
 - guix-search-params -> guix-package-search-params
 
 **** Replaced
+
 - guix-list-column-format, guix-list-column-value-methods ->
   guix-ENTRY-TYPE-list-format
 - guix-info-displayed-params, guix-info-insert-methods,
@@ -42,6 +51,10 @@ ENTRY-TYPE means "package", "output" or "generation".
   guix-ENTRY-TYPE-list-describe-warning-count
 - guix-package-info-fill-heading -> guix-info-fill
 
+** Noteworthy bug fixes
+
+*** Numbers in package names are correctly handled (http://bugs.gnu.org/19219)
+
 * Changes in 0.9.0 (since 0.8.3)
 
 ** Package management
diff --git a/doc/guix.texi b/doc/guix.texi
index a650a55..73dc5be 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13,7 +13,7 @@
 Copyright @copyright{} 2012, 2013, 2014, 2015, 2016 Ludovic Courtès@*
 Copyright @copyright{} 2013, 2014 Andreas Enge@*
 Copyright @copyright{} 2013 Nikita Karetnikov@*
-Copyright @copyright{} 2015 Mathieu Lirzin@*
+Copyright @copyright{} 2015, 2016 Mathieu Lirzin@*
 Copyright @copyright{} 2014 Pierre-Antoine Rault@*
 Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer
 Copyright @copyright{} 2015 Leo Famulari
@@ -1244,14 +1244,14 @@ The @var{options} can be among the following:
 Install the specified @var{package}s.
 
 Each @var{package} may specify either a simple package name, such as
-@code{guile}, or a package name followed by a hyphen and version number,
-such as @code{guile-1.8.8} or simply @code{guile-1.8} (in the latter
+@code{guile}, or a package name followed by an at-sign and version number,
+such as @code{guile@@1.8.8} or simply @code{guile@@1.8} (in the latter
 case, the newest version prefixed by @code{1.8} is selected.)
 
 If no version number is specified, the
 newest available version will be selected.  In addition, @var{package}
 may contain a colon, followed by the name of one of the outputs of the
-package, as in @code{gcc:doc} or @code{binutils-2.22:lib}
+package, as in @code{gcc:doc} or @code{binutils@@2.22:lib}
 (@pxref{Packages with Multiple Outputs}).  Packages with a corresponding
 name (and optionally version) are searched for among the GNU
 distribution modules (@pxref{Package Modules}).
@@ -4390,10 +4390,10 @@ guix import hackage -t -e "'((\"network-uri\" . false))" HTTP
 @end example
 
 A specific package version may optionally be specified by following the
-package name by a hyphen and a version number as in the following example:
+package name by an at-sign and a version number as in the following example:
 
 @example
-guix import hackage mtl-2.1.3.1
+guix import hackage mtl@@2.1.3.1
 @end example
 
 @item elpa
diff --git a/emacs/guix-base.el b/emacs/guix-base.el
index d720a87..6f13c0f 100644
--- a/emacs/guix-base.el
+++ b/emacs/guix-base.el
@@ -43,7 +43,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 236c882..ffb873e 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
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index 2951452..80877c5 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -915,7 +915,7 @@ See `guix-package-info-type'."
 (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."
@@ -923,7 +923,6 @@ Interactively with prefix, prompt for PROFILE."
    (list (guix-read-package-name)
          (guix-ui-read-profile)))
   (guix-package-get-display profile 'name name))
-
 ;;;###autoload
 (defun guix-search-by-regexp (regexp &optional params profile)
   "Search for Guix packages by REGEXP.
diff --git a/gnu/packages.scm b/gnu/packages.scm
index b309a78..3a32442 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -327,7 +327,7 @@ it."
                           (_ "looking for the latest release of GNU ~a...") name)
             ((? upstream-source? source)
              (let ((latest-version
-                    (string-append (upstream-source-package source) "-"
+                    (string-append (upstream-source-package source) "@"
                                    (upstream-source-version source))))
               (when (version>? latest-version full-name)
                 (format (current-error-port)
@@ -345,8 +345,8 @@ but ~a is available upstream~%")
 
 (define (specification->package spec)
   "Return a package matching SPEC.  SPEC may be a package name, or a package
-name followed by a hyphen and a version number.  If the version number is not
-present, return the preferred newest version."
+name followed by an at-sign and a version number.  If the version number is
+not present, return the preferred newest version."
   (let-values (((name version)
                 (package-name->name+version spec)))
     (match (find-best-packages-by-name name version)
@@ -369,9 +369,9 @@ present, return the preferred newest version."
 optionally contain a version number and an output name, as in these examples:
 
   guile
-  guile-2.0.9
+  guile@2.0.9
   guile:debug
-  guile-2.0.9:debug
+  guile@2.0.9:debug
 
 If SPEC does not specify a version number, return the preferred newest
 version; if SPEC does not specify an output, return OUTPUT."
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 73b27a2..f2a43fa 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -227,7 +227,7 @@
                             ;; Drop trailing letters, as gmp-6.0.0a unpacks
                             ;; into gmp-6.0.0.
                             `(symlink ,(string-trim-right
-                                        (package-full-name lib)
+                                        (package-full-name lib "-")
                                         char-set:letter)
                                       ,(package-name lib)))
                           (list gmp mpfr mpc))))
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index e3f9edc..e899e77 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -100,25 +101,13 @@ is typically a \"PACKAGE-VERSION\" string."
                (+ 34 (string-length (%store-directory)))))
 
 (define (package-name->name+version name)
-  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
-\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
-#f are returned.  The first hyphen followed by a digit is considered to
-introduce the version part."
+  "Given NAME, a package name like \"foo@0.9.1b\", return two values: \"foo\"
+and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
+returned.  Both parts must not contain any '@'."
   ;; See also `DrvName' in Nix.
-
-  (define number?
-    (cut char-set-contains? char-set:digit <>))
-
-  (let loop ((chars   (string->list name))
-             (prefix '()))
-    (match chars
-      (()
-       (values name #f))
-      ((#\- (? number? n) rest ...)
-       (values (list->string (reverse prefix))
-               (list->string (cons n rest))))
-      ((head tail ...)
-       (loop tail (cons head prefix))))))
+  (match (string-split name #\@)
+    ((name version) (values name version))
+    (_              (values name #f))))
 
 (define parallel-job-count
   ;; Number of processes to be passed next to GNU Make's `-j' argument.
diff --git a/guix/packages.scm b/guix/packages.scm
index 41f3e20..c43b36f 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;;
@@ -342,9 +343,11 @@ name of its URI."
   package-cross-build-system-error?)
 
 
-(define (package-full-name package)
-  "Return the full name of PACKAGE--i.e., `NAME-VERSION'."
-  (string-append (package-name package) "-" (package-version package)))
+(define* (package-full-name package #:optional (separator "@"))
+  "Return a string which is the concatenation of PACKAGE name, SEPARATOR, and
+PACKAGE version.  SEPARATOR is a optional argument defaulting to \"@\".
+PACKAGE must be a <package> record."
+  (string-append (package-name package) separator (package-version package)))
 
 (define (%standard-patch-inputs)
   (let* ((canonical (module-ref (resolve-interface '(gnu packages base))
diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm
index 4e84278..f2c2002 100644
--- a/guix/scripts/import/hackage.scm
+++ b/guix/scripts/import/hackage.scm
@@ -46,7 +46,7 @@
 (define (show-help)
   (display (_ "Usage: guix import hackage PACKAGE-NAME
 Import and convert the Hackage package for PACKAGE-NAME.  If PACKAGE-NAME
-includes a suffix constituted by a dash followed by a numerical version (as
+includes a suffix constituted by a at-sign followed by a numerical version (as
 used with Guix packages), then a definition for the specified version of the
 package will be generated.  If no version suffix is pecified, then the
 generated package definition will correspond to the latest available
diff --git a/guix/ui.scm b/guix/ui.scm
index 6fd16bb..3778851 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1079,9 +1079,9 @@ package name, version number (or #f), and output name (or OUTPUT).  SPEC may
 optionally contain a version number and an output name, as in these examples:
 
   guile
-  guile-2.0.9
+  guile@2.0.9
   guile:debug
-  guile-2.0.9:debug
+  guile@2.0.9:debug
 "
   (let*-values (((name sub-drv)
                  (match (string-rindex spec #\:)
diff --git a/tests/graph.scm b/tests/graph.scm
index 4f85432..dd5ebcf 100644
--- a/tests/graph.scm
+++ b/tests/graph.scm
@@ -113,7 +113,7 @@ edges."
                      (map (lambda (destination)
                             (list "p-0.drv"
                                   (string-append
-                                   (package-full-name destination)
+                                   (package-full-name destination "-")
                                    ".drv")))
                           implicit)))))))
 
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index f7fb3c5..82900ad 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -149,8 +149,8 @@ guix build coreutils --target=mips64el-linux-gnu --dry-run --no-substitutes
 
 # Parsing package names and versions.
 guix build -n time		# PASS
-guix build -n time-1.7		# PASS, version found
-if guix build -n time-3.2;	# FAIL, version not found
+guix build -n time@1.7		# PASS, version found
+if guix build -n time@3.2;	# FAIL, version not found
 then false; else true; fi
 if guix build -n something-that-will-never-exist; # FAIL
 then false; else true; fi
diff --git a/tests/guix-lint.sh b/tests/guix-lint.sh
index 5015b5c..c105521 100644
--- a/tests/guix-lint.sh
+++ b/tests/guix-lint.sh
@@ -75,4 +75,4 @@ if guix lint -c synopsis,invalid-checker dummy 2>&1 | \
 then true; else false; fi
 
 # Make sure specifying multiple packages works.
-guix lint -c inputs-should-be-native dummy dummy-42 dummy
+guix lint -c inputs-should-be-native dummy dummy@42 dummy
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index cf1a185..273a011 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -207,13 +207,13 @@ cat > "$module_dir/foo.scm"<<EOF
 EOF
 
 guix package -A emacs-foo-bar -L "$module_dir" | grep 42
-guix package -i emacs-foo-bar-42 -n -L "$module_dir"
+guix package -i emacs-foo-bar@42 -n -L "$module_dir"
 
 # Same thing using the 'GUIX_PACKAGE_PATH' environment variable.
 GUIX_PACKAGE_PATH="$module_dir"
 export GUIX_PACKAGE_PATH
 guix package -A emacs-foo-bar | grep 42
-guix package -i emacs-foo-bar-42 -n
+guix package -i emacs-foo-bar@42 -n
 
 # Make sure patches that live under $GUIX_PACKAGE_PATH are found.
 cat > "$module_dir/emacs.patch"<<EOF
diff --git a/tests/ui.scm b/tests/ui.scm
index bd4c907..f28e623 100644
--- a/tests/ui.scm
+++ b/tests/ui.scm
@@ -108,10 +108,10 @@ Second line" 24))
                (package-specification->name+version+output spec))
            list))
        '("guile"
-         "guile-2.0.9"
+         "guile@2.0.9"
          "guile:debug"
-         "guile-2.0.9:debug"
-         "guile-cairo-1.4.1")))
+         "guile@2.0.9:debug"
+         "guile-cairo@1.4.1")))
 
 (test-equal "integer"
   '(1)
diff --git a/tests/utils.scm b/tests/utils.scm
index a05faab..ac622ee 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -59,14 +59,14 @@
           ((name version)
            (let*-values (((full-name)
                           (if version
-                              (string-append name "-" version)
+                              (string-append name "@" version)
                               name))
                          ((name* version*)
                           (package-name->name+version full-name)))
              (and (equal? name* name)
                   (equal? version* version)))))
          '(("foo" "0.9.1b")
-           ("foo-bar" "1.0")
+           ("foo-14-bar" "320")
            ("foo-bar2" #f)
            ("guile" "2.0.6.65-134c9") ; as produced by `git-version-gen'
            ("nixpkgs" "1.0pre22125_a28fe19")
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-01-25 14:04   ` Thompson, David
@ 2016-01-25 21:41     ` Mathieu Lirzin
  2016-01-25 23:33       ` Alex Kost
  0 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-25 21:41 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

"Thompson, David" <dthompson2@worcester.edu> writes:

> Does the fact that so many files needed to be edited indicate the need
> for a single specification string constructor?  If this had already
> been the case, then this patch would have only needed to change 1 or 2
> procedures.

I don't know if such string constructor would help here.  My change log
is maybe a bit misleading.  Most of the files changed are for
documentation and tests which require inevitably to be updated manually
for such interface change.

Some noise is introduced because now the canonical package full name
(with '@') is not a factor of the store file names anymore (which still
uses '-').  Maybe there can be some improvements on this side?

Finally, There is some code redundancy for the emacs UI but If I
remember correctly there is a reason for that. (Alex?)

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-01-25 21:41     ` Mathieu Lirzin
@ 2016-01-25 23:33       ` Alex Kost
  2016-01-26 17:57         ` Mathieu Lirzin
  0 siblings, 1 reply; 65+ messages in thread
From: Alex Kost @ 2016-01-25 23:33 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin (2016-01-26 00:41 +0300) wrote:

> "Thompson, David" <dthompson2@worcester.edu> writes:
>
>> Does the fact that so many files needed to be edited indicate the need
>> for a single specification string constructor?  If this had already
>> been the case, then this patch would have only needed to change 1 or 2
>> procedures.
>
> I don't know if such string constructor would help here.  My change log
> is maybe a bit misleading.  Most of the files changed are for
> documentation and tests which require inevitably to be updated manually
> for such interface change.
>
> Some noise is introduced because now the canonical package full name
> (with '@') is not a factor of the store file names anymore (which still
> uses '-').  Maybe there can be some improvements on this side?
>
> Finally, There is some code redundancy for the emacs UI but If I
> remember correctly there is a reason for that. (Alex?)

If there is redundancy in the code, it should be removed.  I didn't find
a procedure to make a name specification at the time, so I wrote
'make-package-specification' in "emacs/guix-main.scm".  I think we can
add a general procedure to construct a name specification to (guix
utils):

(define* (package-name-specification name #:optional version output)
  (let ((full-name (if version
                       (string-append name "@" version)
                       name)))
    (if output
        (string-append full-name ":" output)
        full-name)))

Then 'package-full-name' from (guix packages) and the code from
"emacs/guix-main.scm" can use it.  WDYT?

-- 
Alex

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 01/13] tests: Use 'dummy-origin' for lint tests when possible.
  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
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 15:58 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * guix/tests/lint.scm ("patches: file names", "patches: not found"): Use
> 'dummy-origin'.  'sha256' field was wrongly set to a string instead of a
> bytevector.

OK!  (The issues was harmless though in this context.)

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 02/13] lint: Remove an unneeded clause in 'check-patch-file-names'.
  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
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:00 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * guix/scripts/lint.scm (check-patch-file-names): Don't check if patches
> start with the package full name since matching the package name (which
> is a prefix of the full name) is sufficient.

Indeed, OK.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 03/13] lint: Rewrite 'check-patch-file-names'.
  2016-01-24 20:19 ` [PATCH 03/13] lint: Rewrite 'check-patch-file-names' Mathieu Lirzin
@ 2016-01-26 16:01   ` Ludovic Courtès
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:01 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * guix/scripts/lint.scm (check-patch-file-names): Improve clarity by
> reversing the logic.
> ---
>  guix/scripts/lint.scm | 29 +++++++++++++----------------
>  1 file changed, 13 insertions(+), 16 deletions(-)

OK.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-01-25 20:56     ` Mathieu Lirzin
@ 2016-01-26 16:22       ` Ludovic Courtès
  2016-01-26 20:52         ` Mathieu Lirzin
  2016-02-19 20:49         ` Mathieu Lirzin
  0 siblings, 2 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:22 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel, Alex Kost

Mathieu Lirzin <mthl@gnu.org> skribis:

> From 7fef43249b704db3c4d511b2f1b62428740cfa73 Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin <mthl@gnu.org>
> Date: Sun, 24 Jan 2016 01:54:44 +0100
> Subject: [PATCH] utils: Use '@' for separating package names and version
>  numbers.
>
> Fixes <http://bugs.gnu.org/19219>.
>
> * guix/build/utils.scm (package-name->name+version): Use '@' for
> separating package names and version numbers instead of '-'.  This
> provides the ability to use numbers in package names.
> * guix/packages.scm (package-full-name): Add an optional SEPARATOR
> argument defaulting to "@".
> * doc/guix.texi (Invoking guix package, Invoking guix import): Adapt to
> the new syntax.
> * guix/ui.scm (package-specification->name+version+output): Likewise.
> * guix/scripts/import/hackage.scm (show-help): Likewise.
> * gnu/packages.scm (check-package-freshness, specification->package)
> (specification->package+output): Likewise.
> * emacs/guix-base.scm (guix-package-name-specification): Likewise.
> * emacs/guix-main.scm (full-name->name+version)
> (name+version->full-name): Likewise.
> * emacs/guix-ui-package.el (guix-packages-by-name): Likewise.
> * tests/guix-build.sh: Likewise.
> * tests/guix-lint.sh: Likewise.
> * tests/guix-package.sh: Likewise.
> * tests/ui.scm ("package-specification->name+version+output"): Likewise.
> * tests/utils.scm ("package-name->name+version"): Likewise.
> * tests/graph.scm ("bag-emerged DAG"): Use 'package-full-name' optional
> SEPARATOR argument.
> * gnu/packages/commencement.scm (gcc-boot0): Likewise.
> * NEWS: Mention new syntax.

[...]

> +++ b/guix/build/utils.scm
> @@ -2,6 +2,7 @@
>  ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
>  ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
>  ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
> +;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
>  ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
> @@ -100,25 +101,13 @@ is typically a \"PACKAGE-VERSION\" string."
>                 (+ 34 (string-length (%store-directory)))))
>  
>  (define (package-name->name+version name)
> -  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
> -\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
> -#f are returned.  The first hyphen followed by a digit is considered to
> -introduce the version part."
> +  "Given NAME, a package name like \"foo@0.9.1b\", return two values: \"foo\"
> +and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
> +returned.  Both parts must not contain any '@'."

I think this one should remain unchanged, first because it triggers a
full rebuild ;-), and second because it has uses in
{emacs,gnu}-build-system that expect exactly these semantics.

So I think we have to simply provide a different version of that in
(guix utils) or so.

Also, I think that at least for some time, the new
‘package-name->name+version’ (maybe we could call it
‘package-specification->name+version’ for consistency) should fall back
to the old method when:

  1. The spec has no @ sign, and

  2. The specified package name was not found.

It could print a warning when the old method has been used *and* a
matching package was found, explaining that this is deprecated syntax.

WDYT?

> +(define* (package-full-name package #:optional (separator "@"))
> +  "Return a string which is the concatenation of PACKAGE name, SEPARATOR, and
> +PACKAGE version.  SEPARATOR is a optional argument defaulting to \"@\".
> +PACKAGE must be a <package> record."
> +  (string-append (package-name package) separator (package-version package)))

I wonder what will break by changing the default to ‘@’.  :-)

‘package-full-name’ is used in a bunch of different places, including
user interfaces and for anchors in the generated HTML pages (is ‘@’
allowed in HTML anchor names?).

So yeah, maybe we can try, but I suspect we’ll see breakage in
unexpected places.

The rest looks good to me.

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 05/13] packages: Use '@' in package record printers.
  2016-01-24 20:19 ` [PATCH 05/13] packages: Use '@' in package record printers Mathieu Lirzin
@ 2016-01-26 16:22   ` Ludovic Courtès
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:22 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * guix/packages.scm <package>: Use '@' in record printer.
> * guix/import/cabal.scm <cabal-package>: Likewise
> * guix/import/elpa.scm <elpa-package>: Likewise.
> * tests/packages.scm: Adapt to it.

OK!

Ludo'.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 07/13] build: Add 'DL' silent rule.
  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
  0 siblings, 1 reply; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:28 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * Makefile.am (AM_V_DL, AM_V_DL_, AM_V_DL_0): New variables.
> * gnu-system.am (gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz)
> (gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz)
> (gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz)
> (gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz): Use $(AM_V_DL).

Since downloading is pretty unusual and unexpected (understandably so),
I wonder if we should it leave this one as noisy as it is so that people
see the name of the script that downloads the thing and inspect it.

WDYT?

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 08/13] build: Add 'DOT' silent rule.
  2016-01-24 20:19 ` [PATCH 08/13] build: Add 'DOT' " Mathieu Lirzin
@ 2016-01-26 16:28   ` Ludovic Courtès
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:28 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * Makefile.am (AM_V_DOT, AM_V_DOT_, AM_V_DOT_0): New variables.
> * doc.am (.dot.png, .dot.pdf, .dot.eps): Use $(AM_V_DOT).

OK!

Ludo'.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 09/13] build: Add 'EMACS' silent rule.
  2016-01-24 20:19 ` [PATCH 09/13] build: Add 'EMACS' " Mathieu Lirzin
@ 2016-01-26 16:28   ` Ludovic Courtès
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:28 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * Makefile.am (AM_V_EMACS, AM_V_EMACS_, AM_V_EMACS_0): New variables.
> * emacs.am [HAVE_EMACS] ($(AUTOLOADS)): Use $(AM_V_EMACS).

OK!

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 10/13] build: Add 'HELP2MAN' silent rule.
  2016-01-24 20:19 ` [PATCH 10/13] build: Add 'HELP2MAN' " Mathieu Lirzin
@ 2016-01-26 16:29   ` Ludovic Courtès
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:29 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * Makefile.am (AM_V_HELP2MAN, AM_V_HELP2MAN_, AM_V_HELP2MAN_0): New
> variables.
> * doc.am [BUILD_FROM_GIT] (gen_man): Use $(AM_V_EMACS).

OK!

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 11/13] build: Delete emacs/guix-autoloads.el when 'make clean'.
  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
  0 siblings, 1 reply; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:33 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * emacs.am (CLEANFILES) [HAVE_EMACS]: Add $(AUTOLOADS).

Additionally, $(AUTOLOADS) must be moved from ‘dist_lisp_DATA’ to
‘nodist_lisp_DATA’.  The commit’s subject line should become “Remove
guix-autoloads.el from the distribution.”

$(AUTOLOADS) were wrongfully part of the distribution.

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 12/13] build: Use 'GEN' and 'at' silent rules.
  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
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:34 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * daemon.am (nix/libstore/schema.sql.hh, etc/guix-daemon.service)
> (etc/guix-daemon.conf): Use $(AM_V_GEN).
> * doc.am (doc/os-config-%.texi, .png.eps): Likewise.
> * Makefile.am (guix-binary.%.tar.xz, gen-ChangeLog, gen-AUTHORS):
> Likewise.
> (assert-binaries-available, assert-final-inputs-self-contained)
> (assert-no-store-file-names, sync-descriptions): Use $(AM_V_at).

OK!

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 13/13] Update .gitignore.
  2016-01-24 20:19 ` [PATCH 13/13] Update .gitignore Mathieu Lirzin
@ 2016-01-26 16:34   ` Ludovic Courtès
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:34 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> * .gitignore: Sort lines.  Use globbing for "*.{eps,pdf,png,tar.xz}"
> files.

OK.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  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
  0 siblings, 1 reply; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 16:52 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> This improves compilation speed since scripts are not compiled twice.
> When building with ‘make -j4‘ from a clean repository on an Intel
> i5-2540M, the time of compilation gets from:
>
> real	5m7.220s
> user	18m49.788s
> sys	0m12.964s
>
> down to:
>
> real	2m20.820s
> user	7m25.992s
> sys	0m7.464s
>
> * configure.ac (BUILD_FROM_GIT): New Automake conditional.
> * doc.am (SUBCOMMANDS): Delete variable.
> (dist_man1_MANS): List all subcommands man pages.
> (doc/guix.1): Build only if BUILD_FROM_GIT.  Depend on 'scripts/guix'
> instead of all subcommands.
> [BUILD_DAEMON] (doc/guix-daemon): Likewise.  Replace the
> 'nix/nix-daemon/guix-daemon.cc' prerequisite with 'guix-daemon'.
> [BUILD_FROM_GIT] (gen_man): New variable.
> [BUILD_FROM_GIT] (doc/guix-%.1): New target.
> (CLEANFILES) [BUILD_FROM_GIT]: Add $(dist_man1_MANS).

I like the speedup, but not the ‘BUILD_FROM_GIT’ approach.  :-)
It reminds me of maintainer-mode and all its warts (info "(automake)
maintainer-mode").

Namely, I think it’s best to have the help2man rule always triggered
whenever the corresponding .scm file is newer, rather than have it
triggered or not based on a guess of what the user wants/can do.

Having said that, I’m not sure what to do.  Commit 0af3f404 reverted the
original approach, which was to depend on .go files (and obviously
wouldn’t work as we want.)

So we want to delay the build of man pages without making the dependency
on build products explicit.  Hmm, not sure what can be done.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 07/13] build: Add 'DL' silent rule.
  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
  0 siblings, 2 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-26 17:44 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> * Makefile.am (AM_V_DL, AM_V_DL_, AM_V_DL_0): New variables.
>> * gnu-system.am (gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz)
>> (gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz)
>> (gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz)
>> (gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz): Use $(AM_V_DL).
>
> Since downloading is pretty unusual and unexpected (understandably so),
> I wonder if we should it leave this one as noisy as it is so that people
> see the name of the script that downloads the thing and inspect it.
>
> WDYT?

Indeed, this is unusual and should be avoided in a “normal” make
context.  However I am not sure about the effect of noise in such case:

--8<---------------cut here---------------start------------->8---
/bin/mkdir -p `dirname "gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz"`
GUILE_LOAD_COMPILED_PATH=".:$GUILE_LOAD_COMPILED_PATH" /usr/bin/guile --no-auto-compile -L "." -L "." "./build-aux/download.scm" "gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz" "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b"
downloading file `gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz' from `http://alpha.gnu.org/gnu/guix/bootstrap/mips64el-linux/20131110/guile-2.0.9.tar.xz'...
--8<---------------cut here---------------end--------------->8---

this can easily be overlooked as “another” compilation warning produced
by Guile.

--8<---------------cut here---------------start------------->8---
  DL       gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz
--8<---------------cut here---------------end--------------->8---

IMO “DL” is explicit enough since the target name is a tarball and a
simple search for the target name in the Makefile gives the actual
command.  We could use the full word “DOWNLOAD” instead of “DL” but on
the other hand this will visually blend with the “LOAD” for guile
modules.

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-01-25 23:33       ` Alex Kost
@ 2016-01-26 17:57         ` Mathieu Lirzin
  0 siblings, 0 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-26 17:57 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> writes:

> Mathieu Lirzin (2016-01-26 00:41 +0300) wrote:
>
>> Finally, There is some code redundancy for the emacs UI but If I
>> remember correctly there is a reason for that. (Alex?)
>
> If there is redundancy in the code, it should be removed.  I didn't find
> a procedure to make a name specification at the time, so I wrote
> 'make-package-specification' in "emacs/guix-main.scm".  I think we can
> add a general procedure to construct a name specification to (guix
> utils):

Sorry, my mind got confused. ;)

--8<---------------cut here---------------start------------->8---
(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\"."
  (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))

(define* (make-package-specification name #:optional version output)
  (let ((full-name (if version
                       (name+version->full-name name version)
                       name)))
    (if output
        (string-append full-name ":" output)
        full-name)))
--8<---------------cut here---------------end--------------->8---

I overlooked that this code handles “full names” without having a
<package> object as an argument.

> (define* (package-name-specification name #:optional version output)
>   (let ((full-name (if version
>                        (string-append name "@" version)
>                        name)))
>     (if output
>         (string-append full-name ":" output)
>         full-name)))
>
> Then 'package-full-name' from (guix packages) and the code from
> "emacs/guix-main.scm" can use it.  WDYT?

It seems a good idea to me now.

Thanks,

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 07/13] build: Add 'DL' silent rule.
  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
  1 sibling, 0 replies; 65+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2016-01-26 19:22 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> writes:

> We could use the full word “DOWNLOAD” instead of “DL” but on the other
> hand this will visually blend with the “LOAD” for guile modules.

This might be subjective but I think "DOWNLOAD" and "LOAD" are pretty
significantly different, both in shape and meaning (specifically in a
context that doesn't normally involve networking), so I see little
potential for confusion.

One could also go for "FETCH" maybe, but I like the big, all-caps
"DOWNLOAD". :-)


Thanks for this work by the way!  I love clean output.

Taylan

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-26 16:52   ` Ludovic Courtès
@ 2016-01-26 20:08     ` Mathieu Lirzin
  2016-01-28  2:37       ` Eric Bavier
  0 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-26 20:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> * configure.ac (BUILD_FROM_GIT): New Automake conditional.
>> * doc.am (SUBCOMMANDS): Delete variable.
>> (dist_man1_MANS): List all subcommands man pages.
>> (doc/guix.1): Build only if BUILD_FROM_GIT.  Depend on 'scripts/guix'
>> instead of all subcommands.
>> [BUILD_DAEMON] (doc/guix-daemon): Likewise.  Replace the
>> 'nix/nix-daemon/guix-daemon.cc' prerequisite with 'guix-daemon'.
>> [BUILD_FROM_GIT] (gen_man): New variable.
>> [BUILD_FROM_GIT] (doc/guix-%.1): New target.
>> (CLEANFILES) [BUILD_FROM_GIT]: Add $(dist_man1_MANS).
>
> I like the speedup, but not the ‘BUILD_FROM_GIT’ approach.  :-)
> It reminds me of maintainer-mode and all its warts (info "(automake)
> maintainer-mode").

The BUILD_FROM_GIT is inspired by what is done for GNU Hello.  ;)
However I don't have a strong opinion on this.

> Namely, I think it’s best to have the help2man rule always triggered
> whenever the corresponding .scm file is newer, rather than have it
> triggered or not based on a guess of what the user wants/can do.

OK.

> Having said that, I’m not sure what to do.  Commit 0af3f404 reverted the
> original approach, which was to depend on .go files (and obviously
> wouldn’t work as we want.)
>
> So we want to delay the build of man pages without making the dependency
> on build products explicit.  Hmm, not sure what can be done.

I have tried to add $(GOBJECTS) to BUILT_SOURCES and let the man pages
prerequisites like in 0af3f404.  The problem was that the build didn't
fully took advantage of possible parallelisms because everything had to
wait for $(GOBJECTS) to complete before compiling anything else, and the
modules are loaded using only one thread.

Another approach is to embed ‘help2man’ (which is what Coreutils is
doing), so we can let the man pages depend on .go files.  This seems
reasonable to me even if it means adding 20K of Perl in the repo.  ;)

WDYT?

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  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
  1 sibling, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-26 20:52 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Alex Kost

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> +++ b/guix/build/utils.scm
>>
>>  (define (package-name->name+version name)
>> -  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
>> -\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
>> -#f are returned.  The first hyphen followed by a digit is considered to
>> -introduce the version part."
>> +  "Given NAME, a package name like \"foo@0.9.1b\", return two values: \"foo\"
>> +and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
>> +returned.  Both parts must not contain any '@'."
>
> I think this one should remain unchanged, first because it triggers a
> full rebuild ;-), and second because it has uses in
> {emacs,gnu}-build-system that expect exactly these semantics.

Actually It seems not used in gnu-build-system, instead there is this:

--8<---------------cut here---------------start------------->8---
      ;; XXX: We'd rather use `package-name->name+version' or similar.
      (string-drop (if dash
                       (substring base 0 dash)
                       base)
                   (+ 1 (string-index base #\-)))))
--8<---------------cut here---------------end--------------->8---

> So I think we have to simply provide a different version of that in
> (guix utils) or so.
>
> Also, I think that at least for some time, the new
> ‘package-name->name+version’ (maybe we could call it
> ‘package-specification->name+version’ for consistency) should fall back
> to the old method when:
>
>   1. The spec has no @ sign, and
>
>   2. The specified package name was not found.
>
> It could print a warning when the old method has been used *and* a
> matching package was found, explaining that this is deprecated syntax.

OK. I will give a try.

>> +(define* (package-full-name package #:optional (separator "@"))
>> +  "Return a string which is the concatenation of PACKAGE name, SEPARATOR, and
>> +PACKAGE version.  SEPARATOR is a optional argument defaulting to \"@\".
>> +PACKAGE must be a <package> record."
>> +  (string-append (package-name package) separator (package-version package)))
>
> I wonder what will break by changing the default to ‘@’.  :-)
>
> ‘package-full-name’ is used in a bunch of different places, including
> user interfaces and for anchors in the generated HTML pages (is ‘@’
> allowed in HTML anchor names?).

According to <https://www.w3.org/TR/html401/types.html#type-name>, using
‘@’ in ids is not compatible with HTML4.  But according to
<https://www.w3.org/TR/2014/REC-html5-20141028/dom.html#the-id-attribute>
and from what I have successfully tested in Icecat 38.5.2, it works in
HTML5.

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 07/13] build: Add 'DL' silent rule.
  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
  1 sibling, 1 reply; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 21:06 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Mathieu Lirzin <mthl@gnu.org> skribis:
>>
>>> * Makefile.am (AM_V_DL, AM_V_DL_, AM_V_DL_0): New variables.
>>> * gnu-system.am (gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz)
>>> (gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz)
>>> (gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz)
>>> (gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz): Use $(AM_V_DL).
>>
>> Since downloading is pretty unusual and unexpected (understandably so),
>> I wonder if we should it leave this one as noisy as it is so that people
>> see the name of the script that downloads the thing and inspect it.
>>
>> WDYT?
>
> Indeed, this is unusual and should be avoided in a “normal” make
> context.  However I am not sure about the effect of noise in such case:
>
> /bin/mkdir -p `dirname "gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz"`
> GUILE_LOAD_COMPILED_PATH=".:$GUILE_LOAD_COMPILED_PATH" /usr/bin/guile --no-auto-compile -L "." -L "." "./build-aux/download.scm" "gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz" "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b"
> downloading file `gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz' from `http://alpha.gnu.org/gnu/guix/bootstrap/mips64el-linux/20131110/guile-2.0.9.tar.xz'...
>
> this can easily be overlooked as “another” compilation warning produced
> by Guile.
>
>   DL       gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz

Actually that’d be fine if the “downloading file” message above would
remain visible.

WDYT?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-01-26 20:52         ` Mathieu Lirzin
@ 2016-01-26 21:08           ` Ludovic Courtès
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-26 21:08 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel, Alex Kost

Mathieu Lirzin <mthl@gnu.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Mathieu Lirzin <mthl@gnu.org> skribis:
>>
>>> +++ b/guix/build/utils.scm
>>>
>>>  (define (package-name->name+version name)
>>> -  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
>>> -\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
>>> -#f are returned.  The first hyphen followed by a digit is considered to
>>> -introduce the version part."
>>> +  "Given NAME, a package name like \"foo@0.9.1b\", return two values: \"foo\"
>>> +and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
>>> +returned.  Both parts must not contain any '@'."
>>
>> I think this one should remain unchanged, first because it triggers a
>> full rebuild ;-), and second because it has uses in
>> {emacs,gnu}-build-system that expect exactly these semantics.
>
> Actually It seems not used in gnu-build-system, instead there is this:
>
>       ;; XXX: We'd rather use `package-name->name+version' or similar.
>       (string-drop (if dash
>                        (substring base 0 dash)
>                        base)
>                    (+ 1 (string-index base #\-)))))

It’s almost used, then.  ;-)

>> So I think we have to simply provide a different version of that in
>> (guix utils) or so.
>>
>> Also, I think that at least for some time, the new
>> ‘package-name->name+version’ (maybe we could call it
>> ‘package-specification->name+version’ for consistency) should fall back
>> to the old method when:
>>
>>   1. The spec has no @ sign, and
>>
>>   2. The specified package name was not found.
>>
>> It could print a warning when the old method has been used *and* a
>> matching package was found, explaining that this is deprecated syntax.
>
> OK. I will give a try.

Awesome!

>>> +(define* (package-full-name package #:optional (separator "@"))
>>> +  "Return a string which is the concatenation of PACKAGE name, SEPARATOR, and
>>> +PACKAGE version.  SEPARATOR is a optional argument defaulting to \"@\".
>>> +PACKAGE must be a <package> record."
>>> +  (string-append (package-name package) separator (package-version package)))
>>
>> I wonder what will break by changing the default to ‘@’.  :-)
>>
>> ‘package-full-name’ is used in a bunch of different places, including
>> user interfaces and for anchors in the generated HTML pages (is ‘@’
>> allowed in HTML anchor names?).
>
> According to <https://www.w3.org/TR/html401/types.html#type-name>, using
> ‘@’ in ids is not compatible with HTML4.  But according to
> <https://www.w3.org/TR/2014/REC-html5-20141028/dom.html#the-id-attribute>
> and from what I have successfully tested in Icecat 38.5.2, it works in
> HTML5.

OK, thanks for researching it.  I guess we can conservatively keep using
hyphens for anchors.

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 07/13] build: Add 'DL' silent rule.
  2016-01-26 21:06       ` Ludovic Courtès
@ 2016-01-26 21:14         ` Mathieu Lirzin
  0 siblings, 0 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-26 21:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>>
>> /bin/mkdir -p `dirname "gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz"`
>> GUILE_LOAD_COMPILED_PATH=".:$GUILE_LOAD_COMPILED_PATH"
>> /usr/bin/guile --no-auto-compile -L "." -L "."
>> "./build-aux/download.scm"
>> "gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz"
>> "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b"
>> downloading file `gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz' from `http://alpha.gnu.org/gnu/guix/bootstrap/mips64el-linux/20131110/guile-2.0.9.tar.xz'...
>>
>> this can easily be overlooked as “another” compilation warning produced
>> by Guile.
>>
>>   DL       gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz
>
> Actually that’d be fine if the “downloading file” message above would
> remain visible.

Sold!  ;)

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 11/13] build: Delete emacs/guix-autoloads.el when 'make clean'.
  2016-01-26 16:33   ` Ludovic Courtès
@ 2016-01-26 22:55     ` Mathieu Lirzin
  0 siblings, 0 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-26 22:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> * emacs.am (CLEANFILES) [HAVE_EMACS]: Add $(AUTOLOADS).
>
> Additionally, $(AUTOLOADS) must be moved from ‘dist_lisp_DATA’ to
> ‘nodist_lisp_DATA’.  The commit’s subject line should become “Remove
> guix-autoloads.el from the distribution.”
>
> $(AUTOLOADS) were wrongfully part of the distribution.

Indeed.

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-26 20:08     ` Mathieu Lirzin
@ 2016-01-28  2:37       ` Eric Bavier
  2016-01-28 15:44         ` Mathieu Lirzin
  0 siblings, 1 reply; 65+ messages in thread
From: Eric Bavier @ 2016-01-28  2:37 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

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

On Tue, 26 Jan 2016 21:08:36 +0100
Mathieu Lirzin <mthl@gnu.org> wrote:

> ludo@gnu.org (Ludovic Courtès) writes:
> 
> > Mathieu Lirzin <mthl@gnu.org> skribis:
> >
> >> * configure.ac (BUILD_FROM_GIT): New Automake conditional.
> >> * doc.am (SUBCOMMANDS): Delete variable.
> >> (dist_man1_MANS): List all subcommands man pages.
> >> (doc/guix.1): Build only if BUILD_FROM_GIT.  Depend on 'scripts/guix'
> >> instead of all subcommands.
> >> [BUILD_DAEMON] (doc/guix-daemon): Likewise.  Replace the
> >> 'nix/nix-daemon/guix-daemon.cc' prerequisite with 'guix-daemon'.
> >> [BUILD_FROM_GIT] (gen_man): New variable.
> >> [BUILD_FROM_GIT] (doc/guix-%.1): New target.
> >> (CLEANFILES) [BUILD_FROM_GIT]: Add $(dist_man1_MANS).
> >
> > I like the speedup, but not the ‘BUILD_FROM_GIT’ approach.  :-)
> > It reminds me of maintainer-mode and all its warts (info "(automake)
> > maintainer-mode").
> 
> The BUILD_FROM_GIT is inspired by what is done for GNU Hello.  ;)
> However I don't have a strong opinion on this.
> 
> > Namely, I think it’s best to have the help2man rule always triggered
> > whenever the corresponding .scm file is newer, rather than have it
> > triggered or not based on a guess of what the user wants/can do.
> 
> OK.
> 
> > Having said that, I’m not sure what to do.  Commit 0af3f404 reverted the
> > original approach, which was to depend on .go files (and obviously
> > wouldn’t work as we want.)
> >
> > So we want to delay the build of man pages without making the dependency
> > on build products explicit.  Hmm, not sure what can be done.
> 
> I have tried to add $(GOBJECTS) to BUILT_SOURCES and let the man pages
> prerequisites like in 0af3f404.  The problem was that the build didn't
> fully took advantage of possible parallelisms because everything had to
> wait for $(GOBJECTS) to complete before compiling anything else, and the
> modules are loaded using only one thread.
> 
> Another approach is to embed ‘help2man’ (which is what Coreutils is
> doing), so we can let the man pages depend on .go files.  This seems
> reasonable to me even if it means adding 20K of Perl in the repo.  ;)
> 
> WDYT?

Here's my rough first take at this.  It uses the status 77 convention
to update a sentinel file and selectively run help2man.

I realize the silent rule output isn't yet polished.

`~Eric

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-Generate-manpages-after-.go-are-compiled.patch --]
[-- Type: text/x-patch, Size: 3082 bytes --]

From 038645a3d14cd10fdb37f94703e463d8f7a3241a Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Wed, 27 Jan 2016 20:31:04 -0600
Subject: [PATCH] doc: Generate manpages after .go are compiled.

* build-aux/compile-all.scm: Exit 77 if no files to compile.
* Makefile.am (make-go): Rename target to make-go.stamp.  Update if any
  files were successfully compiled.
* doc.am (subcommand-manual-target): Add dependency on make-go.stamp.
  Run help2man only if script input is changed.
---
 Makefile.am               | 12 +++++++++---
 build-aux/compile-all.scm |  1 +
 doc.am                    | 15 ++++++++++++---
 3 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 1ede6d4..f97a2a4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -368,15 +368,21 @@ CLEANFILES =					\
 # user ran 'make install' recently).  When that happens, we end up loading
 # those previously-installed .go files, which may be stale, thereby breaking
 # the whole thing.
-%.go: make-go ; @:
-make-go: $(MODULES) guix/config.scm guix/tests.scm
+%.go: make-go.stamp ; @:
+make-go.stamp: $(MODULES) guix/config.scm guix/tests.scm
 	$(AM_V_at)echo "Compiling Scheme modules..." ;			\
 	unset GUILE_LOAD_COMPILED_PATH ;				\
 	host=$(host) srcdir="$(top_srcdir)"				\
 	$(top_builddir)/pre-inst-env					\
 	$(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)"		\
 	  --no-auto-compile 						\
-	  -s "$(top_srcdir)"/build-aux/compile-all.scm $^
+	  -s "$(top_srcdir)"/build-aux/compile-all.scm $^;		\
+	status=$$?; 							\
+	case $$status in						\
+	  77) : ;; 							\
+	  0) touch $@ ;; 						\
+	  *) exit $$status ;; 						\
+	esac
 
 SUFFIXES = .go
 
diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm
index e0877db..c8ccbd1 100644
--- a/build-aux/compile-all.scm
+++ b/build-aux/compile-all.scm
@@ -75,6 +75,7 @@
 (match (command-line)
   ((_ . files)
    (let ((files (filter file-needs-compilation? files)))
+     (when (null? files) (primitive-exit 77)) ;skip
      (for-each load-module-file files)
      (let ((mutex (make-mutex)))
        (par-for-each (lambda (file)
diff --git a/doc.am b/doc.am
index f15efcc..b3996d1 100644
--- a/doc.am
+++ b/doc.am
@@ -106,9 +106,18 @@ doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
 
 define subcommand-manual-target
 
-doc/guix-$(1).1: guix/scripts/$(1).scm
-	-LANGUAGE= $(top_builddir)/pre-inst-env		\
-	  $(HELP2MAN) --output="$$@" "guix $(1)"
+# Note: The dependency on make-go.stamp is to force these docs to be made only
+# after all guile modules have been compiled, so that they are not compiled
+# during this rule.  But we only want to actually generate the manpages if the
+# corresponding script source has been changed.
+doc/guix-$(1).1: guix/scripts/$(1).scm make-go.stamp
+	-$(AM_V_at)case '$$?' in \
+	  *$$<*) \
+	    echo "  GEN     $$@"; \
+	    LANGUAGE= $(top_builddir)/pre-inst-env \
+	    $(HELP2MAN) --output="$$@" "guix $(1)" ;; \
+	  *) : ;; \
+	esac
 
 endef
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-28  2:37       ` Eric Bavier
@ 2016-01-28 15:44         ` Mathieu Lirzin
  2016-01-28 15:59           ` Eric Bavier
  0 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-28 15:44 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Hi Eric,

Eric Bavier <ericbavier@openmailbox.org> writes:

> Here's my rough first take at this.  It uses the status 77 convention
> to update a sentinel file and selectively run help2man.
>
> I realize the silent rule output isn't yet polished.

I have pushed the reviewed patches.  So now it is polished. :)

> From 038645a3d14cd10fdb37f94703e463d8f7a3241a Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Wed, 27 Jan 2016 20:31:04 -0600
> Subject: [PATCH] doc: Generate manpages after .go are compiled.
>
> * build-aux/compile-all.scm: Exit 77 if no files to compile.
> * Makefile.am (make-go): Rename target to make-go.stamp.  Update if any
>   files were successfully compiled.
> * doc.am (subcommand-manual-target): Add dependency on make-go.stamp.
>   Run help2man only if script input is changed.
> ---
>  Makefile.am               | 12 +++++++++---
>  build-aux/compile-all.scm |  1 +
>  doc.am                    | 15 ++++++++++++---
>  3 files changed, 22 insertions(+), 6 deletions(-)
>
[...]
> diff --git a/doc.am b/doc.am
> index f15efcc..b3996d1 100644
> --- a/doc.am
> +++ b/doc.am
> @@ -106,9 +106,18 @@ doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
>  
>  define subcommand-manual-target
>  
> -doc/guix-$(1).1: guix/scripts/$(1).scm
> -	-LANGUAGE= $(top_builddir)/pre-inst-env		\
> -	  $(HELP2MAN) --output="$$@" "guix $(1)"
> +# Note: The dependency on make-go.stamp is to force these docs to be made only
> +# after all guile modules have been compiled, so that they are not compiled
> +# during this rule.  But we only want to actually generate the manpages if the
> +# corresponding script source has been changed.
> +doc/guix-$(1).1: guix/scripts/$(1).scm make-go.stamp
> +	-$(AM_V_at)case '$$?' in \
> +	  *$$<*) \
> +	    echo "  GEN     $$@"; \
> +	    LANGUAGE= $(top_builddir)/pre-inst-env \
> +	    $(HELP2MAN) --output="$$@" "guix $(1)" ;; \
> +	  *) : ;; \
> +	esac

IIUC, there is a problem with adding ‘make-go.stamp’ as a prerequisite
here.  Since building ‘.go’ files from the tarball will trigger the
rebuild of man pages.

Did I miss something?

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-28 15:44         ` Mathieu Lirzin
@ 2016-01-28 15:59           ` Eric Bavier
  2016-01-28 17:00             ` Mathieu Lirzin
  0 siblings, 1 reply; 65+ messages in thread
From: Eric Bavier @ 2016-01-28 15:59 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

On 2016-01-28 09:44, Mathieu Lirzin wrote:
> Hi Eric,
> 
> Eric Bavier <ericbavier@openmailbox.org> writes:
> 
>> Here's my rough first take at this.  It uses the status 77 convention
>> to update a sentinel file and selectively run help2man.
>> 
>> I realize the silent rule output isn't yet polished.
> 
> I have pushed the reviewed patches.  So now it is polished. :)
> 
>> From 038645a3d14cd10fdb37f94703e463d8f7a3241a Mon Sep 17 00:00:00 2001
>> From: Eric Bavier <bavier@member.fsf.org>
>> Date: Wed, 27 Jan 2016 20:31:04 -0600
>> Subject: [PATCH] doc: Generate manpages after .go are compiled.
>> 
>> * build-aux/compile-all.scm: Exit 77 if no files to compile.
>> * Makefile.am (make-go): Rename target to make-go.stamp.  Update if 
>> any
>>   files were successfully compiled.
>> * doc.am (subcommand-manual-target): Add dependency on make-go.stamp.
>>   Run help2man only if script input is changed.
>> ---
>>  Makefile.am               | 12 +++++++++---
>>  build-aux/compile-all.scm |  1 +
>>  doc.am                    | 15 ++++++++++++---
>>  3 files changed, 22 insertions(+), 6 deletions(-)
>> 
> [...]
>> diff --git a/doc.am b/doc.am
>> index f15efcc..b3996d1 100644
>> --- a/doc.am
>> +++ b/doc.am
>> @@ -106,9 +106,18 @@ doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
>> 
>>  define subcommand-manual-target
>> 
>> -doc/guix-$(1).1: guix/scripts/$(1).scm
>> -	-LANGUAGE= $(top_builddir)/pre-inst-env		\
>> -	  $(HELP2MAN) --output="$$@" "guix $(1)"
>> +# Note: The dependency on make-go.stamp is to force these docs to be 
>> made only
>> +# after all guile modules have been compiled, so that they are not 
>> compiled
>> +# during this rule.  But we only want to actually generate the 
>> manpages if the
>> +# corresponding script source has been changed.
>> +doc/guix-$(1).1: guix/scripts/$(1).scm make-go.stamp
>> +	-$(AM_V_at)case '$$?' in \
>> +	  *$$<*) \
>> +	    echo "  GEN     $$@"; \
>> +	    LANGUAGE= $(top_builddir)/pre-inst-env \
>> +	    $(HELP2MAN) --output="$$@" "guix $(1)" ;; \
>> +	  *) : ;; \
>> +	esac
> 
> IIUC, there is a problem with adding ‘make-go.stamp’ as a prerequisite
> here.  Since building ‘.go’ files from the tarball will trigger the
> rebuild of man pages.

That's what the case statement is for, it skips the invocation of 
help2man if the script source was not among the dependents updated.  A 
'touch' could be run on $@ in that case, rather than just exiting, so 
that the rule in not run repeatedly.

-- 
`~Eric

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-28 15:59           ` Eric Bavier
@ 2016-01-28 17:00             ` Mathieu Lirzin
  2016-01-29  0:27               ` Eric Bavier
  0 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-28 17:00 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@openmailbox.org> writes:

>>> diff --git a/doc.am b/doc.am
>>> index f15efcc..b3996d1 100644
>>> --- a/doc.am
>>> +++ b/doc.am
>>> @@ -106,9 +106,18 @@ doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
>>>
>>>  define subcommand-manual-target
>>>
>>> -doc/guix-$(1).1: guix/scripts/$(1).scm
>>> -	-LANGUAGE= $(top_builddir)/pre-inst-env		\
>>> -	  $(HELP2MAN) --output="$$@" "guix $(1)"
>>> +# Note: The dependency on make-go.stamp is to force these docs to
>>> be made only
>>> +# after all guile modules have been compiled, so that they are not
>>> compiled
>>> +# during this rule.  But we only want to actually generate the
>>> manpages if the
>>> +# corresponding script source has been changed.
>>> +doc/guix-$(1).1: guix/scripts/$(1).scm make-go.stamp
>>> +	-$(AM_V_at)case '$$?' in \
>>> +	  *$$<*) \
>>> +	    echo "  GEN     $$@"; \
>>> +	    LANGUAGE= $(top_builddir)/pre-inst-env \
>>> +	    $(HELP2MAN) --output="$$@" "guix $(1)" ;; \
>>> +	  *) : ;; \
>>> +	esac
>>
>> IIUC, there is a problem with adding ‘make-go.stamp’ as a prerequisite
>> here.  Since building ‘.go’ files from the tarball will trigger the
>> rebuild of man pages.
>
> That's what the case statement is for, it skips the invocation of
> help2man if the script source was not among the dependents updated.  A
> 'touch' could be run on $@ in that case, rather than just exiting, so
> that the rule in not run repeatedly.

Oh, I overlooked that.  So the ‘make-go.stamp’ is for Delaying help2man
when building from Git, and the ‘case’ is for rebuilding the man pages
only when the corresponding ‘.scm’ script file has changed.  That's
smart and seems to fix the problem perfectly.

OTOH I must admit that for maintainability reasons I would prefer
avoiding complexity in Makefiles as much as possible.  This means using
Automake's abstract concepts as much as possible, having a simple
dependency graph on top of that, and put things that don't fit well in
this scheme in individual "build-aux/" scripts.  For that reason I still
prefer the embed help2man solution.  but otherwise it looks nice.  :)

Thanks.

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-28 17:00             ` Mathieu Lirzin
@ 2016-01-29  0:27               ` Eric Bavier
  2016-01-29 16:17                 ` Mathieu Lirzin
  0 siblings, 1 reply; 65+ messages in thread
From: Eric Bavier @ 2016-01-29  0:27 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

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

On Thu, 28 Jan 2016 18:00:35 +0100
Mathieu Lirzin <mthl@gnu.org> wrote:

> OTOH I must admit that for maintainability reasons I would prefer
> avoiding complexity in Makefiles as much as possible.  This means
> using Automake's abstract concepts as much as possible, having a
> simple dependency graph on top of that, and put things that don't fit
> well in this scheme in individual "build-aux/" scripts.  For that
> reason I still prefer the embed help2man solution.  but otherwise it
> looks nice.  :)

I sympathize with the concerns for maintainability.  In this case, it
seems to me that a few lines of make/shell would be preferable to 20k
lines of perl.  Perhaps the simpler attached patch is better?

`~Eric

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-Generate-man-pages-after-compiling-guile-objec.patch --]
[-- Type: text/x-patch, Size: 2090 bytes --]

From 4f369cb6d49cbb6620a0cae117107d6d5e72edc5 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Wed, 27 Jan 2016 20:31:04 -0600
Subject: [PATCH] build: Generate man pages after compiling guile objects.

* doc.am (SUBCOMMAND_MANS): New variable.
  (subcommand-manual-target): Add dependency on SUBCOMMAND_MANS.
  Run help2man only if script input is changed.
---
 doc.am | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/doc.am b/doc.am
index ad59aa5..e009a24 100644
--- a/doc.am
+++ b/doc.am
@@ -94,7 +94,7 @@ dvi-local: ps-local
 \f
 # Manual pages.
 
-doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
+doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm) $(SUBCOMMAND_MANS)
 	-$(AM_V_HELP2MAN)LANGUAGE= $(top_builddir)/pre-inst-env		\
 	  $(HELP2MAN) --output="$@" guix
 
@@ -106,9 +106,18 @@ doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
 
 define subcommand-manual-target
 
-doc/guix-$(1).1: guix/scripts/$(1).scm
-	-$$(AM_V_HELP2MAN)LANGUAGE= $(top_builddir)/pre-inst-env	\
-	  $(HELP2MAN) --output="$$@" "guix $(1)"
+# Note: The dependency on $(GOBJECTS) is to force these docs to be made only
+# after all guile modules have been compiled.  The 'case' ensures the manpages
+# are only generated if the corresponding script source has been changed.
+doc/guix-$(1).1: guix/scripts/$(1).scm $(GOBJECTS)
+	-@case '$$?' in \
+	  *$$<*) \
+	    cmd='LANGUAGE= $(top_builddir)/pre-inst-env \
+                  $(HELP2MAN) --output="$$@" "guix $(1)"'; \
+	    if $(AM_V_P); then echo "$$$$cmd"; else echo "  HELP2MAN" $$@; fi; \
+	    eval "$$$$cmd" ;; \
+	  *) : ;; \
+	esac
 
 endef
 
@@ -129,13 +138,14 @@ SUBCOMMANDS :=					\
   refresh					\
   size						\
   system
+SUBCOMMAND_MANS := $(SUBCOMMANDS:%=doc/guix-%.1)
 
 $(eval $(foreach subcommand,$(SUBCOMMANDS),			\
           $(call subcommand-manual-target,$(subcommand))))
 
 dist_man1_MANS =				\
   doc/guix.1					\
-  $(SUBCOMMANDS:%=doc/guix-%.1)
+  $(SUBCOMMAND_MANS)
 
 if BUILD_DAEMON
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-29  0:27               ` Eric Bavier
@ 2016-01-29 16:17                 ` Mathieu Lirzin
  2016-01-29 16:46                   ` Eric Bavier
  0 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-29 16:17 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

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

Eric Bavier <ericbavier@openmailbox.org> writes:

> On Thu, 28 Jan 2016 18:00:35 +0100
> Mathieu Lirzin <mthl@gnu.org> wrote:
>
>> OTOH I must admit that for maintainability reasons I would prefer
>> avoiding complexity in Makefiles as much as possible.  This means
>> using Automake's abstract concepts as much as possible, having a
>> simple dependency graph on top of that, and put things that don't fit
>> well in this scheme in individual "build-aux/" scripts.  For that
>> reason I still prefer the embed help2man solution.  but otherwise it
>> looks nice.  :)
>
> I sympathize with the concerns for maintainability.  In this case, it
> seems to me that a few lines of make/shell would be preferable to 20k
> lines of perl.  Perhaps the simpler attached patch is better?

A few lines of Make/Shell seems more maintainable than a full perl
program.  But in this case the maintenance is handled upstream, so it
only consists in updating the script periodically (which is still not
ideal).

Your patch is definitely better now since the hack is localized to a
specific target.  Let's use this solution!  I have attached an updated
version which simplifies how silent rules are handled and integrates
changes from my initial patch.  


[-- Attachment #2: 0001-build-Generate-man-pages-after-compiling-Guile-objec.patch --]
[-- Type: text/x-diff, Size: 4744 bytes --]

From ab46507a6c2ddcfb3113ed31b1d38bc96c2f1679 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Wed, 27 Jan 2016 20:31:04 -0600
Subject: [PATCH] build: Generate man pages after compiling Guile objects.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This improves compilation speed since scripts are not compiled twice.
When building with ‘make -j4‘ from a clean repository on an Intel
i5-2540M, the time of compilation gets from:

real	4m48.708s
user	17m29.892s
sys	0m9.596s

down to:

real	2m23.399s
user	6m48.604s
sys	0m6.420s

* doc.am (subcommand-manual-target): Delete function.
(SUBCOMMANDS): Delete variable.
(sub_command_mans, gen_man): New variables.
(dist_man1_MANS): Add $(sub_commands_mans).
(doc/guix-%.1): New target for sub-commands man pages.  It ensures that
man pages are built only after compiling Guile objects.
(doc/guix-daemon.1): Use $(gen_man).  Build only if BUILD_DAEMON.
(doc/guix.1): Use $(gen_man).  Add $(sub_command_mans) prerequisite.

Co-authored-by: Mathieu Lirzin <mthl@gnu.org>
---
 doc.am | 91 ++++++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 47 insertions(+), 44 deletions(-)

diff --git a/doc.am b/doc.am
index ad59aa5..d1fd096 100644
--- a/doc.am
+++ b/doc.am
@@ -1,7 +1,9 @@
 # GNU Guix --- Functional package management for GNU
+# Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
 # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
+# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -91,55 +93,56 @@ ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps)		\
 	  $(top_srcdir)/doc/images/coreutils-size-map.eps
 dvi-local: ps-local
 
-\f
-# Manual pages.
-
-doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
-	-$(AM_V_HELP2MAN)LANGUAGE= $(top_builddir)/pre-inst-env		\
-	  $(HELP2MAN) --output="$@" guix
-
-# Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
-# for people building from a tarball.
-doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
-	-$(AM_V_HELP2MAN)LANGUAGE= $(top_builddir)/pre-inst-env		\
-	  $(HELP2MAN) --output="$@" guix-daemon
-
-define subcommand-manual-target
-
-doc/guix-$(1).1: guix/scripts/$(1).scm
-	-$$(AM_V_HELP2MAN)LANGUAGE= $(top_builddir)/pre-inst-env	\
-	  $(HELP2MAN) --output="$$@" "guix $(1)"
-
-endef
-
-SUBCOMMANDS :=					\
-  archive					\
-  build						\
-  challenge					\
-  download					\
-  edit						\
-  environment					\
-  gc						\
-  hash						\
-  import					\
-  lint						\
-  package					\
-  publish					\
-  pull						\
-  refresh					\
-  size						\
-  system
-
-$(eval $(foreach subcommand,$(SUBCOMMANDS),			\
-          $(call subcommand-manual-target,$(subcommand))))
+## ----------- ##
+##  Man pages. ##
+## ----------- ##
+
+sub_commands_mans =				\
+  doc/guix-archive.1				\
+  doc/guix-build.1				\
+  doc/guix-challenge.1				\
+  doc/guix-download.1				\
+  doc/guix-edit.1				\
+  doc/guix-environment.1			\
+  doc/guix-gc.1					\
+  doc/guix-hash.1				\
+  doc/guix-import.1				\
+  doc/guix-lint.1				\
+  doc/guix-package.1				\
+  doc/guix-publish.1				\
+  doc/guix-pull.1				\
+  doc/guix-refresh.1				\
+  doc/guix-size.1				\
+  doc/guix-system.1
 
 dist_man1_MANS =				\
   doc/guix.1					\
-  $(SUBCOMMANDS:%=doc/guix-%.1)
+  $(sub_commands_mans)
+
+# Man pages are generated using GNU help2man.
+gen_man = LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)
+
+# Note: Do not depend on 'scripts/guix' since that would trigger a rebuild
+# even for people building from a tarball.
+doc/guix.1: $(sub_commands_mans)
+	-$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
+
+# Note: The dependency on $(GOBJECTS) is to force these docs to be made only
+# after all guile modules have been compiled.  The 'case' ensures the manpages
+# are only generated if the corresponding script source has been changed.
+doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS)
+	-$(AM_V_HELP2MAN)case '$?' in \
+	  *$<*) $(gen_man) --output="$@" "guix `basename "$<" .scm`";; \
+	  *)    : ;; \
+	esac
 
 if BUILD_DAEMON
 
-dist_man1_MANS +=				\
-  doc/guix-daemon.1
+# Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
+# for people building from a tarball.
+doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
+	-$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
+
+dist_man1_MANS += doc/guix-daemon.1
 
 endif
-- 
2.6.3


[-- Attachment #3: Type: text/plain, Size: 122 bytes --]

Are you OK with it?

Thanks,

--
Mathieu Lirzin

ps: I was speaking of 20KB (790 lines of perl) not 20K lines of code.
:)

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-29 16:17                 ` Mathieu Lirzin
@ 2016-01-29 16:46                   ` Eric Bavier
  2016-01-29 22:56                     ` Mathieu Lirzin
  0 siblings, 1 reply; 65+ messages in thread
From: Eric Bavier @ 2016-01-29 16:46 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

On 2016-01-29 10:17, Mathieu Lirzin wrote:
> Eric Bavier <ericbavier@openmailbox.org> writes:
> 
>> On Thu, 28 Jan 2016 18:00:35 +0100
>> Mathieu Lirzin <mthl@gnu.org> wrote:
>> 
>>> OTOH I must admit that for maintainability reasons I would prefer
>>> avoiding complexity in Makefiles as much as possible.  This means
>>> using Automake's abstract concepts as much as possible, having a
>>> simple dependency graph on top of that, and put things that don't fit
>>> well in this scheme in individual "build-aux/" scripts.  For that
>>> reason I still prefer the embed help2man solution.  but otherwise it
>>> looks nice.  :)
>> 
>> I sympathize with the concerns for maintainability.  In this case, it
>> seems to me that a few lines of make/shell would be preferable to 20k
>> lines of perl.  Perhaps the simpler attached patch is better?
> 
> A few lines of Make/Shell seems more maintainable than a full perl
> program.  But in this case the maintenance is handled upstream, so it
> only consists in updating the script periodically (which is still not
> ideal).
> 
> Your patch is definitely better now since the hack is localized to a
> specific target.  Let's use this solution!  I have attached an updated
> version which simplifies how silent rules are handled and integrates
> changes from my initial patch.
> 
> Are you OK with it?

> This improves compilation speed since scripts are not compiled twice.

It helps immensely on my little netbook :)

> +# Man pages are generated using GNU help2man.
> +gen_man = LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)

I like what you did with sub_commands_mans and gen_man

> +doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS)
> +	-$(AM_V_HELP2MAN)case '$?' in \
> +	  *$<*) $(gen_man) --output="$@" "guix `basename "$<" .scm`";; \
> +	  *)    : ;; \
> +	esac

The `basename "$<" .scm` could be reduced to $* here.

In my patch I was trying to avoid printing the case et al in verbose 
mode.  This should be fine though; anyone reading the output of a 
verbose build might not be put off my the sh.

The rest LGTM!

> ps: I was speaking of 20KB (790 lines of perl) not 20K lines of code.
> :)

heh :)

-- 
`~Eric

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-29 16:46                   ` Eric Bavier
@ 2016-01-29 22:56                     ` Mathieu Lirzin
  2016-01-31  9:17                       ` Ludovic Courtès
  0 siblings, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-01-29 22:56 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@openmailbox.org> writes:

>> +doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS)
>> +	-$(AM_V_HELP2MAN)case '$?' in \
>> +	  *$<*) $(gen_man) --output="$@" "guix `basename "$<" .scm`";; \
>> +	  *)    : ;; \
>> +	esac
>
> The `basename "$<" .scm` could be reduced to $* here.
>
> In my patch I was trying to avoid printing the case et al in verbose
> mode.  This should be fine though; anyone reading the output of a
> verbose build might not be put off my the sh.
>
> The rest LGTM!

pushed in 36629097523b0abd89d1b931293150cb9c1f242d with slight
modifications.

Thanks,

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
  2016-01-29 22:56                     ` Mathieu Lirzin
@ 2016-01-31  9:17                       ` Ludovic Courtès
  0 siblings, 0 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-01-31  9:17 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> Eric Bavier <ericbavier@openmailbox.org> writes:
>
>>> +doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS)
>>> +	-$(AM_V_HELP2MAN)case '$?' in \
>>> +	  *$<*) $(gen_man) --output="$@" "guix `basename "$<" .scm`";; \
>>> +	  *)    : ;; \
>>> +	esac
>>
>> The `basename "$<" .scm` could be reduced to $* here.
>>
>> In my patch I was trying to avoid printing the case et al in verbose
>> mode.  This should be fine though; anyone reading the output of a
>> verbose build might not be put off my the sh.
>>
>> The rest LGTM!
>
> pushed in 36629097523b0abd89d1b931293150cb9c1f242d with slight
> modifications.

Thanks to the two of you for the smart hack!

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-01-26 16:22       ` Ludovic Courtès
  2016-01-26 20:52         ` Mathieu Lirzin
@ 2016-02-19 20:49         ` Mathieu Lirzin
  2016-02-23 11:11           ` Ludovic Courtès
  1 sibling, 1 reply; 65+ messages in thread
From: Mathieu Lirzin @ 2016-02-19 20:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Alex Kost

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> From 7fef43249b704db3c4d511b2f1b62428740cfa73 Mon Sep 17 00:00:00 2001
>> From: Mathieu Lirzin <mthl@gnu.org>
>> Date: Sun, 24 Jan 2016 01:54:44 +0100
>> Subject: [PATCH] utils: Use '@' for separating package names and version
>>  numbers.
>>
> [...]
>>  (define (package-name->name+version name)
>> -  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
>> -\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
>> -#f are returned.  The first hyphen followed by a digit is considered to
>> -introduce the version part."
>> +  "Given NAME, a package name like \"foo@0.9.1b\", return two values: \"foo\"
>> +and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
>> +returned.  Both parts must not contain any '@'."
>
> I think this one should remain unchanged, first because it triggers a
> full rebuild ;-), and second because it has uses in
> {emacs,gnu}-build-system that expect exactly these semantics.
>
> So I think we have to simply provide a different version of that in
> (guix utils) or so.
>
> Also, I think that at least for some time, the new
> ‘package-name->name+version’ (maybe we could call it
> ‘package-specification->name+version’ for consistency) should fall back
> to the old method when:
>
>   1. The spec has no @ sign, and
>
>   2. The specified package name was not found.
>
>
> It could print a warning when the old method has been used *and* a
> matching package was found, explaining that this is deprecated syntax.
>
> WDYT?

I have finally took some time to look into this, and actually
implementing ‘package-specification->name+version’ in (guix utils) with
the suggested fall back feature seems not desirable since checking for
package existence would require using the procedure
‘find-packages-by-name’ from (gnu packages) which will then create a
circular dependency.  Did I miss something?

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-02-19 20:49         ` Mathieu Lirzin
@ 2016-02-23 11:11           ` Ludovic Courtès
  2016-02-29  0:28             ` Mathieu Lirzin
  0 siblings, 1 reply; 65+ messages in thread
From: Ludovic Courtès @ 2016-02-23 11:11 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel, Alex Kost

Mathieu Lirzin <mthl@gnu.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Mathieu Lirzin <mthl@gnu.org> skribis:
>>
>>> From 7fef43249b704db3c4d511b2f1b62428740cfa73 Mon Sep 17 00:00:00 2001
>>> From: Mathieu Lirzin <mthl@gnu.org>
>>> Date: Sun, 24 Jan 2016 01:54:44 +0100
>>> Subject: [PATCH] utils: Use '@' for separating package names and version
>>>  numbers.
>>>
>> [...]
>>>  (define (package-name->name+version name)
>>> -  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
>>> -\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
>>> -#f are returned.  The first hyphen followed by a digit is considered to
>>> -introduce the version part."
>>> +  "Given NAME, a package name like \"foo@0.9.1b\", return two values: \"foo\"
>>> +and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
>>> +returned.  Both parts must not contain any '@'."
>>
>> I think this one should remain unchanged, first because it triggers a
>> full rebuild ;-), and second because it has uses in
>> {emacs,gnu}-build-system that expect exactly these semantics.
>>
>> So I think we have to simply provide a different version of that in
>> (guix utils) or so.
>>
>> Also, I think that at least for some time, the new
>> ‘package-name->name+version’ (maybe we could call it
>> ‘package-specification->name+version’ for consistency) should fall back
>> to the old method when:
>>
>>   1. The spec has no @ sign, and
>>
>>   2. The specified package name was not found.
>>
>>
>> It could print a warning when the old method has been used *and* a
>> matching package was found, explaining that this is deprecated syntax.
>>
>> WDYT?
>
> I have finally took some time to look into this, and actually
> implementing ‘package-specification->name+version’ in (guix utils) with
> the suggested fall back feature seems not desirable since checking for
> package existence would require using the procedure
> ‘find-packages-by-name’ from (gnu packages) which will then create a
> circular dependency.  Did I miss something?

No, good point.

What about this:

  1. Put the new ‘package-name->name+version’ in (guix utils) and keep
     it dumb (i.e., it insists on having an ‘@’, as is the case with the
     patch you posted.)

  2. Add the fallback case in ‘specification->package’ and
     ‘specification->package+output’ in (gnu packages).

How does that sound?

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  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-03 10:29               ` Alex Kost
  0 siblings, 2 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-02-29  0:28 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Alex Kost

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

Hi,

ludo@gnu.org (Ludovic Courtès) writes:

> What about this:
>
>   1. Put the new ‘package-name->name+version’ in (guix utils) and keep
>      it dumb (i.e., it insists on having an ‘@’, as is the case with the
>      patch you posted.)
>
>   2. Add the fallback case in ‘specification->package’ and
>      ‘specification->package+output’ in (gnu packages).
>
> How does that sound?

Thanks for finding a solution.  It seems to work (at least according to ‘make
check’).

However, I am not pleased by the current state of the
‘specification/package-name->...’ procedures.  They don't compose well,
and are obfuscated by being fragmented across a bunch of modules.  I
don't know if there is much room for improvement but my feeling is that
the brain involvement required for implementing the '@' thing was far
too high compared to the actual task.

I have left the emacs interface untouched.


[-- Attachment #2: 0001-packages-Factorize-package-specification-search.patch --]
[-- Type: text/x-diff, Size: 4298 bytes --]

From a39b458002e2c4c36c9adb2718f166b4e5ff7965 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Sun, 28 Feb 2016 17:50:58 +0100
Subject: [PATCH 1/2] packages: Factorize package specification search.

* gnu/packages.scm (%find-package): New procedure.
(specification->package, specification->package+output): Use it.
---
 gnu/packages.scm | 64 +++++++++++++++++++++++++-------------------------------
 1 file changed, 29 insertions(+), 35 deletions(-)

diff --git a/gnu/packages.scm b/gnu/packages.scm
index 64a695d..baec897 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -276,26 +277,31 @@ return its return value."
                     (lambda (k signum)
                       (handler signum))))
 
+\f
+;;;
+;;; Package specification.
+;;;
+
+(define (%find-package spec name version)
+  (match (find-best-packages-by-name name version)
+    ((pkg . pkg*)
+     (unless (null? pkg*)
+       (warning (_ "ambiguous package specification `~a'~%") spec)
+       (warning (_ "choosing ~a from ~a~%")
+                (package-full-name pkg)
+                (location->string (package-location pkg))))
+     pkg)
+    (_
+     (if version
+         (leave (_ "~A: package not found for version ~a~%") name version)
+         (leave (_ "~A: unknown package~%") name)))))
+
 (define (specification->package spec)
   "Return a package matching SPEC.  SPEC may be a package name, or a package
 name followed by a hyphen and a version number.  If the version number is not
 present, return the preferred newest version."
-  (let-values (((name version)
-                (package-name->name+version spec)))
-    (match (find-best-packages-by-name name version)
-      ((p)                                      ; one match
-       p)
-      ((p x ...)                                ; several matches
-       (warning (_ "ambiguous package specification `~a'~%") spec)
-       (warning (_ "choosing ~a from ~a~%")
-                (package-full-name p)
-                (location->string (package-location p)))
-       p)
-      (_                                        ; no matches
-       (if version
-           (leave (_ "~A: package not found for version ~a~%")
-                  name version)
-           (leave (_ "~A: unknown package~%") name))))))
+  (let-values (((name version) (package-name->name+version spec)))
+    (%find-package spec name version)))
 
 (define* (specification->package+output spec #:optional (output "out"))
   "Return the package and output specified by SPEC, or #f and #f; SPEC may
@@ -308,24 +314,12 @@ optionally contain a version number and an output name, as in these examples:
 
 If SPEC does not specify a version number, return the preferred newest
 version; if SPEC does not specify an output, return OUTPUT."
-  (define (ensure-output p sub-drv)
-    (if (member sub-drv (package-outputs p))
-        sub-drv
-        (leave (_ "package `~a' lacks output `~a'~%")
-               (package-full-name p)
-               sub-drv)))
-
   (let-values (((name version sub-drv)
                 (package-specification->name+version+output spec output)))
-    (match (find-best-packages-by-name name version)
-      ((p)
-       (values p (ensure-output p sub-drv)))
-      ((p p* ...)
-       (warning (_ "ambiguous package specification `~a'~%")
-                spec)
-       (warning (_ "choosing ~a from ~a~%")
-                (package-full-name p)
-                (location->string (package-location p)))
-       (values p (ensure-output p sub-drv)))
-      (()
-       (leave (_ "~a: package not found~%") spec)))))
+    (and=> (%find-package spec name version)
+           (lambda (pkg)
+             (if (member sub-drv (package-outputs pkg))
+                 (values pkg sub-drv)
+                 (leave (_ "package `~a' lacks output `~a'~%")
+                        (package-full-name pkg)
+                        sub-drv))))))
-- 
2.7.0


[-- Attachment #3: 0002-utils-Use-for-separating-package-names-and-version-n.patch --]
[-- Type: text/x-diff, Size: 14287 bytes --]

From a5d3eb26c06965647d0e1749b848f8501ae61d62 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Sun, 28 Feb 2016 23:11:36 +0100
Subject: [PATCH 2/2] * utils: Use '@' for separating package names and version
 numbers.

This provides the ability to use numbers in package names.

Fixes <http://bugs.gnu.org/19219>.

* guix/utils.scm (package-name->name+version): New procedure.
* gnu/packages.scm (%find-package): Add a FALLBACK? keyword argument.
Use the previous method when no package is found.
(specification->package+output, specification->package): Adapt
documentation to new syntax.
* doc/guix.texi (Invoking guix package, Invoking guix import): Likewise.
* guix/ui.scm (package-specification->name+version+output): Likewise.
* guix/scripts/import/hackage.scm (show-help): Likewise.
* tests/guix-build.sh: Adapt to new syntax.
* tests/guix-lint.sh: Likewise.
* tests/guix-package.sh: Likewise.
* tests/ui.scm ("package-specification->name+version+output"): Likewise.
* tests/utils.scm ("package-name->name+version"): Likewise.
* NEWS: Mention new syntax.
---
 NEWS                            | 13 +++++++++++++
 doc/guix.texi                   | 12 ++++++------
 gnu/packages.scm                | 18 +++++++++++++-----
 guix/scripts/import/hackage.scm |  2 +-
 guix/ui.scm                     |  4 ++--
 guix/utils.scm                  | 15 ++++++++++++---
 tests/guix-build.sh             |  4 ++--
 tests/guix-lint.sh              |  2 +-
 tests/guix-package.sh           |  4 ++--
 tests/ui.scm                    |  6 +++---
 tests/utils.scm                 |  5 +++--
 11 files changed, 58 insertions(+), 27 deletions(-)

diff --git a/NEWS b/NEWS
index 010789e..b2a6250 100644
--- a/NEWS
+++ b/NEWS
@@ -14,18 +14,26 @@ Please send Guix bug reports to bug-guix@gnu.org.
 
 ** Package management
 
+*** New syntax for separating package names and version numbers
+
+Use ‘@’ instead of ‘-’ as a separator.  This new separator is a reserved
+character which is not allowed both in package names and version numbers.
+
 *** Emacs interface for licenses
 *** Emacs interface for system generations
 *** Emacs interface for hydra.gnu.org
 *** Changes in Emacs interface variables and faces
+
 In the following names, BUFFER-TYPE means "info" or "list";
 ENTRY-TYPE means "package", "output" or "generation".
 
 **** Removed
+
 - guix-info-fill-column
 - guix-info-insert-ENTRY-TYPE-function
 
 **** Renamed
+
 - guix-info-ignore-empty-vals -> guix-info-ignore-empty-values
 - guix-output-name-width -> guix-generation-output-name-width
 - guix-buffer-name-function -> guix-ui-buffer-name-function
@@ -34,6 +42,7 @@ ENTRY-TYPE means "package", "output" or "generation".
 - guix-BUFFER-TYPE-file-path (face) -> guix-BUFFER-TYPE-file-name
 
 **** Replaced
+
 - guix-list-column-format, guix-list-column-value-methods ->
   guix-ENTRY-TYPE-list-format
 - guix-info-displayed-params, guix-info-insert-methods,
@@ -44,6 +53,10 @@ ENTRY-TYPE means "package", "output" or "generation".
   guix-ENTRY-TYPE-list-describe-warning-count
 - guix-package-info-fill-heading -> guix-info-fill
 
+** Noteworthy bug fixes
+
+*** Numbers in package names are correctly handled (http://bugs.gnu.org/19219)
+
 * Changes in 0.9.0 (since 0.8.3)
 
 ** Package management
diff --git a/doc/guix.texi b/doc/guix.texi
index 4c9a91b..705fce1 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13,7 +13,7 @@
 Copyright @copyright{} 2012, 2013, 2014, 2015, 2016 Ludovic Courtès@*
 Copyright @copyright{} 2013, 2014, 2016 Andreas Enge@*
 Copyright @copyright{} 2013 Nikita Karetnikov@*
-Copyright @copyright{} 2015 Mathieu Lirzin@*
+Copyright @copyright{} 2015, 2016 Mathieu Lirzin@*
 Copyright @copyright{} 2014 Pierre-Antoine Rault@*
 Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer@*
 Copyright @copyright{} 2015, 2016 Leo Famulari
@@ -1285,14 +1285,14 @@ The @var{options} can be among the following:
 Install the specified @var{package}s.
 
 Each @var{package} may specify either a simple package name, such as
-@code{guile}, or a package name followed by a hyphen and version number,
-such as @code{guile-1.8.8} or simply @code{guile-1.8} (in the latter
+@code{guile}, or a package name followed by an at-sign and version number,
+such as @code{guile@@1.8.8} or simply @code{guile@@1.8} (in the latter
 case, the newest version prefixed by @code{1.8} is selected.)
 
 If no version number is specified, the
 newest available version will be selected.  In addition, @var{package}
 may contain a colon, followed by the name of one of the outputs of the
-package, as in @code{gcc:doc} or @code{binutils-2.22:lib}
+package, as in @code{gcc:doc} or @code{binutils@@2.22:lib}
 (@pxref{Packages with Multiple Outputs}).  Packages with a corresponding
 name (and optionally version) are searched for among the GNU
 distribution modules (@pxref{Package Modules}).
@@ -4522,10 +4522,10 @@ guix import hackage -t -e "'((\"network-uri\" . false))" HTTP
 @end example
 
 A specific package version may optionally be specified by following the
-package name by a hyphen and a version number as in the following example:
+package name by an at-sign and a version number as in the following example:
 
 @example
-guix import hackage mtl-2.1.3.1
+guix import hackage mtl@@2.1.3.1
 @end example
 
 @item elpa
diff --git a/gnu/packages.scm b/gnu/packages.scm
index baec897..8213886 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -282,7 +282,7 @@ return its return value."
 ;;; Package specification.
 ;;;
 
-(define (%find-package spec name version)
+(define* (%find-package spec name version #:key fallback?)
   (match (find-best-packages-by-name name version)
     ((pkg . pkg*)
      (unless (null? pkg*)
@@ -290,15 +290,23 @@ return its return value."
        (warning (_ "choosing ~a from ~a~%")
                 (package-full-name pkg)
                 (location->string (package-location pkg))))
+     (when fallback?
+       (warning (_ "deprecated NAME-VERSION syntax.~%")))
      pkg)
     (_
      (if version
          (leave (_ "~A: package not found for version ~a~%") name version)
-         (leave (_ "~A: unknown package~%") name)))))
+         (or fallback?
+             ;; XXX: Fallback to the older specification style with an hyphen
+             ;; between NAME and VERSION, for backward compatibility.
+             (let ((proc (@ (guix build utils) package-name->name+version)))
+               (call-with-values (proc name)
+                 (cut %find-package spec <> <> #:fallback? #t)))
+             (leave (_ "~A: unknown package~%") name))))))
 
 (define (specification->package spec)
   "Return a package matching SPEC.  SPEC may be a package name, or a package
-name followed by a hyphen and a version number.  If the version number is not
+name followed by an at-sign and a version number.  If the version number is not
 present, return the preferred newest version."
   (let-values (((name version) (package-name->name+version spec)))
     (%find-package spec name version)))
@@ -308,9 +316,9 @@ present, return the preferred newest version."
 optionally contain a version number and an output name, as in these examples:
 
   guile
-  guile-2.0.9
+  guile@2.0.9
   guile:debug
-  guile-2.0.9:debug
+  guile@2.0.9:debug
 
 If SPEC does not specify a version number, return the preferred newest
 version; if SPEC does not specify an output, return OUTPUT."
diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm
index 4e84278..f2c2002 100644
--- a/guix/scripts/import/hackage.scm
+++ b/guix/scripts/import/hackage.scm
@@ -46,7 +46,7 @@
 (define (show-help)
   (display (_ "Usage: guix import hackage PACKAGE-NAME
 Import and convert the Hackage package for PACKAGE-NAME.  If PACKAGE-NAME
-includes a suffix constituted by a dash followed by a numerical version (as
+includes a suffix constituted by a at-sign followed by a numerical version (as
 used with Guix packages), then a definition for the specified version of the
 package will be generated.  If no version suffix is pecified, then the
 generated package definition will correspond to the latest available
diff --git a/guix/ui.scm b/guix/ui.scm
index 7310773..a3ec683 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1081,9 +1081,9 @@ package name, version number (or #f), and output name (or OUTPUT).  SPEC may
 optionally contain a version number and an output name, as in these examples:
 
   guile
-  guile-2.0.9
+  guile@2.0.9
   guile:debug
-  guile-2.0.9:debug
+  guile@2.0.9:debug
 "
   (let*-values (((name sub-drv)
                  (match (string-rindex spec #\:)
diff --git a/guix/utils.scm b/guix/utils.scm
index c61f105..de54179 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013, 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -31,8 +32,7 @@
   #:use-module (rnrs bytevectors)
   #:use-module (rnrs io ports)
   #:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!))
-  #:use-module ((guix build utils)
-                #:select (dump-port package-name->name+version))
+  #:use-module ((guix build utils) #:select (dump-port))
   #:use-module ((guix build syscalls) #:select (errno mkdtemp!))
   #:use-module (ice-9 vlist)
   #:use-module (ice-9 format)
@@ -42,7 +42,6 @@
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
   #:use-module (system foreign)
-  #:re-export (package-name->name+version)
   #:export (bytevector->base16-string
             base16-string->bytevector
 
@@ -66,6 +65,7 @@
             gnu-triplet->nix-system
             %current-system
             %current-target-system
+            package-name->name+version
             version-compare
             version>?
             version>=?
@@ -544,6 +544,15 @@ returned by `config.guess'."
   ;; cross-building to.
   (make-parameter #f))
 
+(define (package-name->name+version spec)
+  "Given SPEC, a package name like \"foo@0.9.1b\", return two values: \"foo\"
+and \"0.9.1b\".  When the version part is unavailable, SPEC and #f are
+returned.  Both parts must not contain any '@'."
+  (match (string-rindex spec #\@)
+    (#f  (values spec #f))
+    (idx (values (substring spec 0 idx)
+                 (substring spec (1+ idx))))))
+
 (define version-compare
   (let ((strverscmp
          (let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index 347cdfa..6175bf8 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -161,8 +161,8 @@ then false; else true; fi
 
 # Parsing package names and versions.
 guix build -n time		# PASS
-guix build -n time-1.7		# PASS, version found
-if guix build -n time-3.2;	# FAIL, version not found
+guix build -n time@1.7		# PASS, version found
+if guix build -n time@3.2;	# FAIL, version not found
 then false; else true; fi
 if guix build -n something-that-will-never-exist; # FAIL
 then false; else true; fi
diff --git a/tests/guix-lint.sh b/tests/guix-lint.sh
index 5015b5c..c105521 100644
--- a/tests/guix-lint.sh
+++ b/tests/guix-lint.sh
@@ -75,4 +75,4 @@ if guix lint -c synopsis,invalid-checker dummy 2>&1 | \
 then true; else false; fi
 
 # Make sure specifying multiple packages works.
-guix lint -c inputs-should-be-native dummy dummy-42 dummy
+guix lint -c inputs-should-be-native dummy dummy@42 dummy
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index cf1a185..273a011 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -207,13 +207,13 @@ cat > "$module_dir/foo.scm"<<EOF
 EOF
 
 guix package -A emacs-foo-bar -L "$module_dir" | grep 42
-guix package -i emacs-foo-bar-42 -n -L "$module_dir"
+guix package -i emacs-foo-bar@42 -n -L "$module_dir"
 
 # Same thing using the 'GUIX_PACKAGE_PATH' environment variable.
 GUIX_PACKAGE_PATH="$module_dir"
 export GUIX_PACKAGE_PATH
 guix package -A emacs-foo-bar | grep 42
-guix package -i emacs-foo-bar-42 -n
+guix package -i emacs-foo-bar@42 -n
 
 # Make sure patches that live under $GUIX_PACKAGE_PATH are found.
 cat > "$module_dir/emacs.patch"<<EOF
diff --git a/tests/ui.scm b/tests/ui.scm
index bd4c907..f28e623 100644
--- a/tests/ui.scm
+++ b/tests/ui.scm
@@ -108,10 +108,10 @@ Second line" 24))
                (package-specification->name+version+output spec))
            list))
        '("guile"
-         "guile-2.0.9"
+         "guile@2.0.9"
          "guile:debug"
-         "guile-2.0.9:debug"
-         "guile-cairo-1.4.1")))
+         "guile@2.0.9:debug"
+         "guile-cairo@1.4.1")))
 
 (test-equal "integer"
   '(1)
diff --git a/tests/utils.scm b/tests/utils.scm
index a05faab..67b3724 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,14 +60,14 @@
           ((name version)
            (let*-values (((full-name)
                           (if version
-                              (string-append name "-" version)
+                              (string-append name "@" version)
                               name))
                          ((name* version*)
                           (package-name->name+version full-name)))
              (and (equal? name* name)
                   (equal? version* version)))))
          '(("foo" "0.9.1b")
-           ("foo-bar" "1.0")
+           ("foo-14-bar" "320")
            ("foo-bar2" #f)
            ("guile" "2.0.6.65-134c9") ; as produced by `git-version-gen'
            ("nixpkgs" "1.0pre22125_a28fe19")
-- 
2.7.0


[-- Attachment #4: Type: text/plain, Size: 19 bytes --]


--
Mathieu Lirzin

^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  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-03 10:29               ` Alex Kost
  1 sibling, 2 replies; 65+ messages in thread
From: Ludovic Courtès @ 2016-02-29 16:00 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel, Alex Kost

Mathieu Lirzin <mthl@gnu.org> skribis:

> However, I am not pleased by the current state of the
> ‘specification/package-name->...’ procedures.  They don't compose well,
> and are obfuscated by being fragmented across a bunch of modules.  I
> don't know if there is much room for improvement but my feeling is that
> the brain involvement required for implementing the '@' thing was far
> too high compared to the actual task.

The idea is that things that need to traverse the list of packages live
in (gnu packages), whereas syntactic helpers leave in (guix ui) and
such.  This is so that the (guix …) module are (almost) independent of
the (gnu …) modules.

That said, if you think of improvements, that’d be interesting!

> From a39b458002e2c4c36c9adb2718f166b4e5ff7965 Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin <mthl@gnu.org>
> Date: Sun, 28 Feb 2016 17:50:58 +0100
> Subject: [PATCH 1/2] packages: Factorize package specification search.
>
> * gnu/packages.scm (%find-package): New procedure.
> (specification->package, specification->package+output): Use it.

[...]

>  (define* (specification->package+output spec #:optional (output "out"))
>    "Return the package and output specified by SPEC, or #f and #f; SPEC may

[...]

> +    (and=> (%find-package spec name version)
> +           (lambda (pkg)
> +             (if (member sub-drv (package-outputs pkg))
> +                 (values pkg sub-drv)

This fragment can return a single value instead of two.  Thus, it should
be changed to something like:

  (match (%find-package spec name version)
    (#f
     (values #f #f))
    (package   ;no need to call it ‘pkg’  :-)
     …))

OK with this change!

> From a5d3eb26c06965647d0e1749b848f8501ae61d62 Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin <mthl@gnu.org>
> Date: Sun, 28 Feb 2016 23:11:36 +0100
> Subject: [PATCH 2/2] * utils: Use '@' for separating package names and version
>  numbers.

Extra star in subject.

> +*** New syntax for separating package names and version numbers
> +
> +Use ‘@’ instead of ‘-’ as a separator.  This new separator is a reserved
                                       ^^
Maybe add: “, as in ‘gnupg@2.0’.”

> +character which is not allowed both in package names and version numbers.

Maybe add:

  The old syntax to specify a package’s version—e.g., as “gnupg-2.0—is
  obsolete and support for it will be removed in the future.

OK with changes along these lines.

Thanks a lot!  This closes another item towards 0.9.1.  \o/

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-02-29 16:00               ` Ludovic Courtès
@ 2016-03-02 21:35                 ` Mathieu Lirzin
  2016-03-05  1:28                 ` Nils Gillmann
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-03-02 21:35 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Alex Kost

ludo@gnu.org (Ludovic Courtès) writes:

> OK with changes along these lines.
>
> Thanks a lot!  This closes another item towards 0.9.1.  \o/

Pushed in 1b846da8c372bee78851439fd9e72b2499115e5a with the suggested changes.

Thanks for the review.

-- 
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-02-29  0:28             ` Mathieu Lirzin
  2016-02-29 16:00               ` Ludovic Courtès
@ 2016-03-03 10:29               ` Alex Kost
  2016-03-03 16:55                 ` Ludovic Courtès
  2016-03-04 23:03                 ` Mathieu Lirzin
  1 sibling, 2 replies; 65+ messages in thread
From: Alex Kost @ 2016-03-03 10:29 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

[-- 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


^ permalink raw reply related	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-03-03 10:29               ` Alex Kost
@ 2016-03-03 16:55                 ` Ludovic Courtès
  2016-03-04 10:19                   ` Alex Kost
  2016-03-04 23:03                 ` Mathieu Lirzin
  1 sibling, 1 reply; 65+ messages in thread
From: Ludovic Courtès @ 2016-03-03 16:55 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

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

I think I was afraid that existing uses in unexpected place would break,
such as when using the full name as anchor names in HTML.

But then I also remember a version of ‘package-full-name’ that took an
optional separator that defaulted to ‘@’.  I forgot the details!  :-)
I don’t think it’s crucial though.  WDYT?

> 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"?

I would leave them unchanged.

> 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.

Looks good.  I forgot about these places where the “full name” matters,
sorry about that.

> 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.

OK!

Thanks for catching it!

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-03-03 16:55                 ` Ludovic Courtès
@ 2016-03-04 10:19                   ` Alex Kost
  0 siblings, 0 replies; 65+ messages in thread
From: Alex Kost @ 2016-03-04 10:19 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès (2016-03-03 19:55 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> Sorry if it was discussed but why 'package-full-name' from (guix
>> packages) wasn't changed?
>
> I think I was afraid that existing uses in unexpected place would break,
> such as when using the full name as anchor names in HTML.
>
> But then I also remember a version of ‘package-full-name’ that took an
> optional separator that defaulted to ‘@’.  I forgot the details!  :-)
> I don’t think it’s crucial though.  WDYT?

I don't have an opinion on changing 'package-full-name' as I have no
idea what may be broken after this change.  As there are no visible
breaks now, it can be left unchanged I believe.

>> 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"?
>
> I would leave them unchanged.

Great, that's what I thought, thanks!

>> 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.
>
> Looks good.  I forgot about these places where the “full name” matters,
> sorry about that.

It's not your fault, I didn't remember about this place either :-)

>> 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.
>
> OK!

Thanks!  I have committed both patches.

-- 
Alex

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-03-03 10:29               ` Alex Kost
  2016-03-03 16:55                 ` Ludovic Courtès
@ 2016-03-04 23:03                 ` Mathieu Lirzin
  2016-03-04 23:25                   ` Ludovic Courtès
  2016-03-05  9:16                   ` Alex Kost
  1 sibling, 2 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-03-04 23:03 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Hi,

Alex Kost <alezost@gmail.com> writes:

> 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".

The concern of backward compability that Ludo raised, have made the work
more challenging than changing things in place.  As a consequence it was
not clear to me what should/can change or not.  To keep my mind clear, I
have decided to leave the emacs part unchanged.  So the true reason is
exhaustion.  :)

-- 
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  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
  1 sibling, 1 reply; 65+ messages in thread
From: Ludovic Courtès @ 2016-03-04 23:25 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel, Alex Kost

Mathieu Lirzin <mthl@gnu.org> skribis:

> Alex Kost <alezost@gmail.com> writes:
>
>> 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".
>
> The concern of backward compability that Ludo raised, have made the work
> more challenging than changing things in place.  As a consequence it was
> not clear to me what should/can change or not.  To keep my mind clear, I
> have decided to leave the emacs part unchanged.  So the true reason is
> exhaustion.  :)

Sorry that this had this effect!

Ludo’.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-03-04 23:25                   ` Ludovic Courtès
@ 2016-03-05  1:08                     ` Mathieu Lirzin
  0 siblings, 0 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-03-05  1:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Alex Kost

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> The concern of backward compability that Ludo raised, have made the work
>> more challenging than changing things in place.  As a consequence it was
>> not clear to me what should/can change or not.  To keep my mind clear, I
>> have decided to leave the emacs part unchanged.  So the true reason is
>> exhaustion.  :)
>
> Sorry that this had this effect!

not Breaking "userspace" is a valid concern that deserves care.  so
please don't be sorry.

-- 
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  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
  1 sibling, 2 replies; 65+ messages in thread
From: Nils Gillmann @ 2016-03-05  1:28 UTC (permalink / raw)
  To: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Mathieu Lirzin <mthl@gnu.org> skribis:
>> +*** New syntax for separating package names and version numbers
>> +
>> +Use ‘@’ instead of ‘-’ as a separator.  This new separator is a reserved
>                                        ^^
> Maybe add: “, as in ‘gnupg@2.0’.”
>
>> +character which is not allowed both in package names and version numbers.
>
> Maybe add:
>
>   The old syntax to specify a package’s version—e.g., as “gnupg-2.0—is
>   obsolete and support for it will be removed in the future.
>
> OK with changes along these lines.
>
> Thanks a lot!  This closes another item towards 0.9.1.  \o/
>
> Ludo’.

I read through this, and I think I have to read the whole thread
again. So the new 0.9.1 way for writing $PN-$PV is no longer "-"
but "@" as in libreoffice@10.0.0 ? Or is this simply a hydra
/ some other part of architecture thing?


-- 
ng
irc://loupsycedyglgamf.onion:67/~NiAsterisk
https://psyced.org:34443/NiAsterisk/
EDN: https://wiki.c3d2.de/Echt_Dezentrales_Netz/en

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-03-04 23:03                 ` Mathieu Lirzin
  2016-03-04 23:25                   ` Ludovic Courtès
@ 2016-03-05  9:16                   ` Alex Kost
  1 sibling, 0 replies; 65+ messages in thread
From: Alex Kost @ 2016-03-05  9:16 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

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

> Alex Kost <alezost@gmail.com> writes:
>
>> 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".
>
> The concern of backward compability that Ludo raised, have made the work
> more challenging than changing things in place.  As a consequence it was
> not clear to me what should/can change or not.  To keep my mind clear, I
> have decided to leave the emacs part unchanged.  So the true reason is
> exhaustion.  :)

Fair enough!  And thanks for your work, now you are a very knowledgeable
person in this "name@version" part of code!

-- 
Alex

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-03-05  1:28                 ` Nils Gillmann
@ 2016-03-05  9:24                   ` Alex Kost
  2016-03-05  9:36                   ` Mathieu Lirzin
  1 sibling, 0 replies; 65+ messages in thread
From: Alex Kost @ 2016-03-05  9:24 UTC (permalink / raw)
  To: Nils Gillmann; +Cc: guix-devel

Nils Gillmann (2016-03-05 04:28 +0300) wrote:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Mathieu Lirzin <mthl@gnu.org> skribis:
>>> +*** New syntax for separating package names and version numbers
>>> +
>>> +Use ‘@’ instead of ‘-’ as a separator.  This new separator is a reserved
>>                                        ^^
>> Maybe add: “, as in ‘gnupg@2.0’.”
>>
>>> +character which is not allowed both in package names and version numbers.
>>
>> Maybe add:
>>
>>   The old syntax to specify a package’s version—e.g., as “gnupg-2.0—is
>>   obsolete and support for it will be removed in the future.
>>
>> OK with changes along these lines.
>>
>> Thanks a lot!  This closes another item towards 0.9.1.  \o/
>>
>> Ludo’.
>
> I read through this, and I think I have to read the whole thread
> again. So the new 0.9.1 way for writing $PN-$PV is no longer "-"
> but "@" as in libreoffice@10.0.0 ? Or is this simply a hydra
> / some other part of architecture thing?

Yes, "libreoffice@10.0.0" is the right way to specify a package+version
now.  Job names on hydra should still be displayed as "foo-0.1".

-- 
Alex

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
  2016-03-05  1:28                 ` Nils Gillmann
  2016-03-05  9:24                   ` Alex Kost
@ 2016-03-05  9:36                   ` Mathieu Lirzin
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Lirzin @ 2016-03-05  9:36 UTC (permalink / raw)
  To: Nils Gillmann; +Cc: guix-devel

Nils Gillmann <niasterisk@grrlz.net> writes:

> I read through this, and I think I have to read the whole thread
> again. So the new 0.9.1 way for writing $PN-$PV is no longer "-"
> but "@" as in libreoffice@10.0.0 ? Or is this simply a hydra
> / some other part of architecture thing?

This new syntax is for user interfaces.  The discussion is quite
long. It has started on this bug report:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19219

-- 
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2016-03-05  9:37 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).