[Top][All Lists]

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

Re: Package.el and specifying alternative dependencies

From: Tim Cross
Subject: Re: Package.el and specifying alternative dependencies
Date: Sun, 5 Mar 2017 10:44:12 +1100

Nice and useful idea. 


On 5 March 2017 at 09:46, Kaushal Modi <address@hidden> wrote:
I have this in my config which works very well. I use this just for org :) I build org from its master branch, so I do not want the dependency check to auto-install older versions from Elpa.

(defun modi/package-dependency-check-ignore (orig-ret)
  "Remove the `black listed packages' from ORIG-RET.
Packages listed in the let-bound `pkg-black-list' will not be auto-installed
even if they are found as dependencies.
It is known that this advice is not effective when installed packages
asynchronously using `paradox'. Below is effective on synchronous
package installations."
  (let ((pkg-black-list '(org))
    (dolist (pkg-struct orig-ret)
      (setq pkg-name (package-desc-name pkg-struct))
      (if (member pkg-name pkg-black-list)
          (message (concat "Package `%s' will not be installed. "
                           "See `modi/package-dependency-check-ignore'.")
        ;; (message "Package to be installed: %s" pkg-name)
        (push pkg-struct new-ret)))
(advice-add 'package-compute-transaction :filter-return #'modi/package-dependency-check-ignore)

On Thu, Mar 2, 2017 at 7:41 PM Tim Cross <address@hidden> wrote:
Is there a way to specify alternative dependencies in a package?

Situation: installing a package is resulting in an additional package being installed even though the dependencies for the package have already been satisfied by another package. This results in two packages being installed which provide overlapping functionality. 

Example. I have installed org-plus-contrib. I then install elfeed-org, which has a dependency on org. This results in the org package being installed, but org is already installed as part of the org-plus-contrib package. 

I'm trying to work out if this is a problem with how dependencies are defined in the elfeed-org package or is it a problem with how org-plus-conrib is specifying what dependency it satisfies? Need to know in order to determine where this issue needs to be logged.

Kaushal Modi



Tim Cross

reply via email to

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