Function: package-download-transaction
package-download-transaction is a byte-compiled function defined in
package.el.gz.
Signature
(package-download-transaction PACKAGES)
Documentation
Download and install all the packages in PACKAGES.
PACKAGES should be a list of package-desc. This function assumes that
all package requirements in PACKAGES are satisfied, i.e. that PACKAGES
is computed using package-compute-transaction. The function returns a
list of package-desc objects that have been installed, or nil if the
transaction had no effect.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defun package-download-transaction (packages)
"Download and install all the packages in PACKAGES.
PACKAGES should be a list of `package-desc'. This function assumes that
all package requirements in PACKAGES are satisfied, i.e. that PACKAGES
is computed using `package-compute-transaction'. The function returns a
list of `package-desc' objects that have been installed, or nil if the
transaction had no effect."
(let* ((installed '())
(pkg-desc (catch 'review-failed
(dolist (pkg-desc packages nil)
(push (package-install-from-archive pkg-desc)
installed)))))
(if pkg-desc
(progn
(message "Rejected `%s', reverting transaction." (package-desc-name pkg-desc))
(mapc #'package-delete installed)
nil)
installed)))