]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/package.el: Use pushnew for downloads in progress
authorArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 29 Apr 2015 23:57:46 +0000 (00:57 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 29 Apr 2015 23:59:26 +0000 (00:59 +0100)
(package--download-and-read-archives): Use pushnew instead of
append.  If something terrible happened during a previous
download, simply refreshing should now make things work again.

lisp/emacs-lisp/package.el

index 84b6987a21a8987c591cd3cf0ef98d56e5efbf37..a65564151bcd6150d792ba8a6fe7797c63f9ec46 100644 (file)
@@ -1463,9 +1463,9 @@ This populates `package-archive-contents'.  If ASYNC is non-nil,
 perform the downloads asynchronously."
   ;; The downloaded archive contents will be read as part of
   ;; `package--update-downloads-in-progress'.
-  (setq package--downloads-in-progress
-        (append package-archives
-                package--downloads-in-progress))
+  (dolist (archive package-archives)
+    (cl-pushnew archive package--downloads-in-progress
+                :test #'equal))
   (dolist (archive package-archives)
     (condition-case-unless-debug nil
         (package--download-one-archive