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)
(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)))))
(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
--- /dev/null
+;;; 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
(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."