guix-commits
[Top][All Lists]
Advanced

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

01/05: scripts: import: elpa: Warn when version is specified.


From: guix-commits
Subject: 01/05: scripts: import: elpa: Warn when version is specified.
Date: Wed, 17 May 2023 17:25:51 -0400 (EDT)

jpoiret pushed a commit to branch master
in repository guix.

commit b89ab866bc176cfc9fdddb4d5a1505611d119dd0
Author: Simon Tournier <zimon.toutoune@gmail.com>
AuthorDate: Mon May 15 19:45:44 2023 +0200

    scripts: import: elpa: Warn when version is specified.
    
    * guix/scripts/import/elpa.scm (guix-import-elpa): Warn when version is
    specified.
    
    Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
---
 guix/scripts/import/elpa.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm
index 052b0cc0e7..a71478d3c8 100644
--- a/guix/scripts/import/elpa.scm
+++ b/guix/scripts/import/elpa.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
+;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -91,7 +92,11 @@ Import the latest package named PACKAGE-NAME from an ELPA 
repository.\n"))
                             (_ #f))
                            (reverse opts))))
     (match args
-      ((package-name)
+      ((spec)
+       (define-values (package-name version)
+         (package-name->name+version spec))
+       (when version
+         (warning (G_ "this importer does not consider the version~%")))
        (if (assoc-ref opts 'recursive)
            (with-error-handling
              (map (match-lambda



reply via email to

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