aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorArtur Malabarba2015-06-30 10:47:25 +0100
committerArtur Malabarba2015-06-30 10:47:25 +0100
commit8d3b9102130dd7091803d96c94415b24fe8a5bbf (patch)
tree9ec219459bca2dd47bff11657bd43b14077249d7 /lisp
parentd0a5162fd825acbbd863e61099e1fa1ce5975773 (diff)
downloademacs-8d3b9102130dd7091803d96c94415b24fe8a5bbf.tar.gz
emacs-8d3b9102130dd7091803d96c94415b24fe8a5bbf.zip
* lisp/emacs-lisp/package.el (package-compute-transaction):
Don't assume version sorting.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/package.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index e599e840fb7..a148783d0c2 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1576,29 +1576,33 @@ SEEN is used internally to detect infinite recursion."
1576 (while (and pkg-descs (not found)) 1576 (while (and pkg-descs (not found))
1577 (let* ((pkg-desc (pop pkg-descs)) 1577 (let* ((pkg-desc (pop pkg-descs))
1578 (version (package-desc-version pkg-desc)) 1578 (version (package-desc-version pkg-desc))
1579 (disabled (package-disabled-p next-pkg version))) 1579 (disabled (package-disabled-p next-pkg version))
1580 found-something)
1580 (cond 1581 (cond
1581 ((version-list-< version next-version) 1582 ((version-list-< version next-version)
1582 (error 1583 ;; pkg-descs is sorted by priority, not version, so
1583 "Need package `%s-%s', but only %s is available" 1584 ;; don't error just yet.
1584 next-pkg (package-version-join next-version) 1585 (unless found-something
1585 (package-version-join version))) 1586 (setq found-something (package-version-join version))))
1586 (disabled 1587 (disabled
1587 (unless problem 1588 (unless problem
1588 (setq problem 1589 (setq problem
1589 (if (stringp disabled) 1590 (if (stringp disabled)
1590 (format "Package `%s' held at version %s, \ 1591 (format "Package `%s' held at version %s, but version %s required"
1591but version %s required"
1592 next-pkg disabled 1592 next-pkg disabled
1593 (package-version-join next-version)) 1593 (package-version-join next-version))
1594 (format "Required package '%s' is disabled" 1594 (format "Required package '%s' is disabled"
1595 next-pkg))))) 1595 next-pkg)))))
1596 (t (setq found pkg-desc))))) 1596 (t (setq found pkg-desc)))))
1597 (unless found 1597 (unless found
1598 (if problem 1598 (cond
1599 (error "%s" problem) 1599 (problem (error "%s" problem))
1600 (error "Package `%s-%s' is unavailable" 1600 (found-something
1601 next-pkg (package-version-join next-version)))) 1601 (error "Need package `%s-%s', but only %s is available"
1602 next-pkg (package-version-join next-version)
1603 found-something))
1604 (t (error "Package `%s-%s' is unavailable"
1605 next-pkg (package-version-join next-version)))))
1602 (setq packages 1606 (setq packages
1603 (package-compute-transaction (cons found packages) 1607 (package-compute-transaction (cons found packages)
1604 (package-desc-reqs found) 1608 (package-desc-reqs found)