From 08640f9eed6d9d155ecf42d021bc99d4f57d7449 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Mon, 12 Jul 2010 22:13:48 -0700 Subject: [PATCH 3/5] 2010-07-12 Phil Hagelberg * emacs-lisp/package.el: Fix bug in package-installed-p which would prevent packages from installing if an older version of their dependencies was already present. --- lisp/emacs-lisp/package.el | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 4dbae56..df3295e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -695,12 +695,12 @@ It will move point to somewhere in the headers." (package-unpack name version) (kill-buffer tar-buffer)))) -(defun package-installed-p (package version) +(defun package-installed-p (package &optional min-version) (let ((pkg-desc (assq package package-alist))) (and pkg-desc - (package-version-compare version - (package-desc-vers (cdr pkg-desc)) - '>=)))) + (package-version-compare min-version + (package-desc-vers (cdr pkg-desc)) + '<=)))) (defun package-compute-transaction (result requirements) (dolist (elt requirements) -- 1.7.0.4