]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix M-x package-install failure if no archive has been fetched yet.
authorPhil Hagelberg <phil@hagelb.org>
Sat, 28 Jan 2012 09:49:29 +0000 (17:49 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 28 Jan 2012 09:49:29 +0000 (17:49 +0800)
* emacs-lisp/package.el (package-install): Run
package-refresh-contents if there is no archive yet.

Fixes: debbugs:97978
lisp/ChangeLog
lisp/emacs-lisp/package.el

index 887959d2fe0d636ba12d777b842445f421418c6a..896f7ce9a97b4d5a4de9b0d7a0ef9c5f63246943 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-28  Phil Hagelberg  <phil@hagelb.org>
+
+       * emacs-lisp/package.el (package-install): Run
+       package-refresh-contents if there is no archive yet (Bug#97978).
+
 2012-01-28  Chong Yidong  <cyd@gnu.org>
 
        * emacs-lisp/package.el (package-maybe-load-descriptor): New
index 7e56c5534ec7d08aa22a8af64352af7946958c45..317fa1fd23dc5268e2c02f8b8703ac10cb576e44 100644 (file)
@@ -889,6 +889,8 @@ archive in `package-archives'.  Interactively, prompt for NAME."
      ;; symbols for completion.
      (unless package--initialized
        (package-initialize t))
+     (unless package-archive-contents
+       (package-refresh-contents))
      (list (intern (completing-read
                    "Install package: "
                    (mapcar (lambda (elt)