Commit dcf78667 authored by Dmitry Gutov's avatar Dmitry Gutov

Fix bug#16826

* lisp/emacs-lisp/package.el (package-compute-transaction):
Use `version-list-<=' to compare the requirement version against
the package version already to be installed.  Update the error
message.
parent 1fc8f655
2014-03-21 Dmitry Gutov <dgutov@yandex.ru>
* emacs-lisp/package.el (package-compute-transaction):
Use `version-list-<=' to compare the requirement version against
the version of package already to be installed. Update the error
message. (Bug#16826)
* progmodes/ruby-mode.el (ruby-smie-rules):
Add indentation rule for ` @ '. (Bug#17050)
......
......@@ -923,10 +923,10 @@ not included in this list."
(setq already pkg)))
(cond
(already
(if (version-list-< next-version (package-desc-version already))
(if (version-list-<= next-version (package-desc-version already))
;; Move to front, so it gets installed early enough (bug#14082).
(setq packages (cons already (delq already packages)))
(error "Need package `%s-%s', but only %s is available"
(error "Need package `%s-%s', but only %s is being installed"
next-pkg (package-version-join next-version)
(package-version-join (package-desc-version already)))))
......
......@@ -6,6 +6,10 @@
(simple-depend .
[(1 0)
((simple-single (1 3))) "A single-file package with a dependency." single])
(simple-two-depend .
[(1 1)
((simple-depend (1 0)) (simple-single (1 3)))
"A single-file package with two dependencies." single])
(multi-file .
[(0 2 3)
nil "Example of a multi-file tar package" tar
......
;;; simple-two-depend.el --- A single-file package with two dependencies.
;; Author: J. R. Hacker <jrh@example.com>
;; Version: 1.1
;; Keywords: frobnicate
;; Package-Requires: ((simple-depend "1.0") (simple-single "1.3"))
;;; Commentary:
;; Depends on two another packages.
;;; Code:
(defvar simple-two-depend "Value"
"Some trivial code")
;;; simple-two-depend.el ends here
......@@ -203,12 +203,22 @@ Must called from within a `tar-mode' buffer."
(should (package-installed-p 'simple-single))
(should (package-installed-p 'simple-depend))))
(ert-deftest package-test-install-two-dependencies ()
"Install a package which includes a dependency."
(with-package-test ()
(package-initialize)
(package-refresh-contents)
(package-install 'simple-two-depend)
(should (package-installed-p 'simple-single))
(should (package-installed-p 'simple-depend))
(should (package-installed-p 'simple-two-depend))))
(ert-deftest package-test-refresh-contents ()
"Parse an \"archive-contents\" file."
(with-package-test ()
(package-initialize)
(package-refresh-contents)
(should (eq 3 (length package-archive-contents)))))
(should (eq 4 (length package-archive-contents)))))
(ert-deftest package-test-install-single-from-archive ()
"Install a single package from a package archive."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment