]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix error message when installing non-existent package
authorStefan Kangas <stefankangas@gmail.com>
Sun, 11 Dec 2022 18:00:01 +0000 (19:00 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Sun, 11 Dec 2022 18:02:44 +0000 (19:02 +0100)
* lisp/emacs-lisp/package.el (package-compute-transaction): Don't add
trailing dash to package name in non-existent package
error.  (Bug#59923)

lisp/emacs-lisp/package.el

index a9fd8c741e8156315a1becc0d2d5342eac8b92c8..4d33311cb746a266cbf193591fe219eb5a1a9e38 100644 (file)
@@ -1949,8 +1949,10 @@ SEEN is used internally to detect infinite recursion."
               (if (eq next-pkg 'emacs)
                   (error "This package requires Emacs version %s"
                          (package-version-join next-version))
-                (error "Package `%s-%s' is unavailable"
-                       next-pkg (package-version-join next-version))))))
+                (error (if (not next-version)
+                           (format "Package `%s' is unavailable" next-pkg)
+                         (format "Package `%s' (version %s) is unavailable"
+                                 next-pkg (package-version-join next-version))))))))
           (setq packages
                 (package-compute-transaction (cons found packages)
                                              (package-desc-reqs found)