emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r116817: Fix bug#16826


From: Dmitry Gutov
Subject: [Emacs-diffs] emacs-24 r116817: Fix bug#16826
Date: Fri, 21 Mar 2014 06:07:10 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116817
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16826
committer: Dmitry Gutov <address@hidden>
branch nick: emacs-24
timestamp: Fri 2014-03-21 08:06:52 +0200
message:
  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.
added:
  test/automated/data/package/simple-two-depend-1.1.el 
simpletwodepend1.1.e-20140321055401-qjbwu39bkvhuhhuh-1
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/package.el     package.el-20100617020707-ybavz666awsxwin6-2
  test/automated/data/package/archive-contents 
archivecontents-20130627091649-1urk343g07eug5h7-3
  test/automated/package-test.el 
packagetest.el-20130627091655-6mb005jio30t2i3i-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-21 04:26:39 +0000
+++ b/lisp/ChangeLog    2014-03-21 06:06:52 +0000
@@ -1,5 +1,10 @@
 2014-03-21  Dmitry Gutov  <address@hidden>
 
+       * 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)
 

=== modified file 'lisp/emacs-lisp/package.el'
--- a/lisp/emacs-lisp/package.el        2014-03-19 16:14:26 +0000
+++ b/lisp/emacs-lisp/package.el        2014-03-21 06:06:52 +0000
@@ -923,10 +923,10 @@
             (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)))))
 

=== modified file 'test/automated/data/package/archive-contents'
--- a/test/automated/data/package/archive-contents      2013-10-01 01:38:37 
+0000
+++ b/test/automated/data/package/archive-contents      2014-03-21 06:06:52 
+0000
@@ -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

=== added file 'test/automated/data/package/simple-two-depend-1.1.el'
--- a/test/automated/data/package/simple-two-depend-1.1.el      1970-01-01 
00:00:00 +0000
+++ b/test/automated/data/package/simple-two-depend-1.1.el      2014-03-21 
06:06:52 +0000
@@ -0,0 +1,17 @@
+;;; simple-two-depend.el --- A single-file package with two dependencies.
+
+;; Author: J. R. Hacker <address@hidden>
+;; 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

=== modified file 'test/automated/package-test.el'
--- a/test/automated/package-test.el    2014-01-01 07:43:34 +0000
+++ b/test/automated/package-test.el    2014-03-21 06:06:52 +0000
@@ -203,12 +203,22 @@
     (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."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]