Function: package-menu--partition-transaction

package-menu--partition-transaction is a byte-compiled function defined in package.el.gz.

Signature

(package-menu--partition-transaction INSTALL DELETE)

Documentation

Return an alist describing an INSTALL DELETE transaction.

Alist contains three entries, upgrade, delete, and install, each with a list of package names.

The upgrade entry contains any package-desc objects in INSTALL whose name coincides with an object in DELETE. The delete and the install entries are the same as DELETE and INSTALL with such objects removed.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defun package-menu--partition-transaction (install delete)
  "Return an alist describing an INSTALL DELETE transaction.
Alist contains three entries, upgrade, delete, and install, each
with a list of package names.

The upgrade entry contains any `package-desc' objects in INSTALL
whose name coincides with an object in DELETE.  The delete and
the install entries are the same as DELETE and INSTALL with such
objects removed."
  (let* ((upg (cl-intersection install delete :key #'package-desc-name))
         (ins (cl-set-difference install upg :key #'package-desc-name))
         (del (cl-set-difference delete upg :key #'package-desc-name)))
    `((delete . ,del) (install . ,ins) (upgrade . ,upg))))