From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: Package.el and specifying alternative dependencies Date: Sat, 04 Mar 2017 22:46:57 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11484ae02f7dfd0549ef71ae X-Trace: blaine.gmane.org 1488668045 25705 195.159.176.226 (4 Mar 2017 22:54:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2017 22:54:05 +0000 (UTC) To: Tim Cross , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 04 23:53:58 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckIYo-0005or-3L for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2017 23:53:58 +0100 Original-Received: from localhost ([::1]:36868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckIYu-000342-BE for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2017 17:54:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckISG-0006lk-6r for emacs-devel@gnu.org; Sat, 04 Mar 2017 17:47:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckISE-0002DG-Qd for emacs-devel@gnu.org; Sat, 04 Mar 2017 17:47:12 -0500 Original-Received: from mail-vk0-x22e.google.com ([2607:f8b0:400c:c05::22e]:34235) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckISE-0002Cg-Lc for emacs-devel@gnu.org; Sat, 04 Mar 2017 17:47:10 -0500 Original-Received: by mail-vk0-x22e.google.com with SMTP id r136so20091787vke.1 for ; Sat, 04 Mar 2017 14:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=8cqXrQErmq44BSDILqvm4+G7bZ6YiCM2FuHJ3ydLHOQ=; b=k167lPGb+ODLDxZQYL3AI2ykvpj1WuFfYqGLYF3uvBKh49/wJMrVt4Vk8Zt4ONNpxq 03B+f1p48/7Ea0uS1oaqZ4On2XYKN3uZn6NSlNQhcahz8dsWLoeQBROCpfUvLZsNWTK/ 5y4UHFL+QgEBv77ku/QokJ8CnMEpLmt7XbVb0sRmDEnNhuTpTOGsdfthG/e8kzjUC0Vm vjlOoCdmXL8+lA1TBu5C1Cfybp0QVFCaii6FTnDZpRRPTaiozYAtw0WBViF2BhwsR8Gt BlGvP9tpesdPdHec8m0CEfU4bPXBRpi0t33H5EtF5UNDVoB6Gj7gZQ0JCeKPy0TY/mW5 M2xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=8cqXrQErmq44BSDILqvm4+G7bZ6YiCM2FuHJ3ydLHOQ=; b=iblpSg2QZeeZ72mjT8H/jqj/UgdjA37TMiBGyMgslWOa3SWp4fHbLlHqmXtL8QbFzu ENRLfDdiKS52pr+2XWTzCuG8C/hdx1mvrUKTW39yjfAdXNZVZqJlK7m5uAGO8O7sBkL6 HBL578W8B4XSH9PAvf/ghUEJZ2AdfX16U5nfxUYBWlzbHN/w37nvU+iMKP5WdpO9qggr cRF7SQHEVVdC1J10Zb169gepVPX8PLIZCJiAFuoK8G7eyTaPBlaenfgXEx1EMimXkGuu X3Tupr1r9IR7usM9UoRoiR2jg1WZ4PH08vEUv85kMDtrJ/edVJzuX/jFV1j/PSM4FIeW pKLQ== X-Gm-Message-State: AMke39kna3NaWqBOJ9b3VRunILNere16DC1KbVwAficLPxA+KS8InnrVgy3PKtSrhegFPOiAlwd9XvdCZxP+hw== X-Received: by 10.31.70.66 with SMTP id t63mr4006506vka.175.1488667628500; Sat, 04 Mar 2017 14:47:08 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212754 Archived-At: --001a11484ae02f7dfd0549ef71ae Content-Type: text/plain; charset=UTF-8 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. ;; http://emacs.stackexchange.com/a/26513/115 (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)) new-ret pkg-name) (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'.") pkg-name) ;; (message "Package to be installed: %s" pkg-name) (push pkg-struct new-ret))) new-ret)) (advice-add 'package-compute-transaction :filter-return #'modi/package-dependency-check-ignore) https://github.com/kaushalmodi/.emacs.d/blob/master/setup-packages.el On Thu, Mar 2, 2017 at 7:41 PM Tim Cross 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 --001a11484ae02f7dfd0549ef71ae Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 d= ependency check to auto-install older versions from Elpa.

(defun modi/package-dependen= cy-check-ignore (orig-ret)
=C2=A0 "Remove the `black listed = packages' from ORIG-RET.
Packages listed in the let-bound `pk= g-black-list' will not be auto-installed
even if they are fou= nd as dependencies.
It is known that this advice is not effective= when installed packages
asynchronously using `paradox'. Belo= w is effective on synchronous
package installations."
<= div>=C2=A0 (let ((pkg-black-list '(org))
=C2=A0 =C2=A0 =C2=A0= =C2=A0 new-ret
=C2=A0 =C2=A0 =C2=A0 =C2=A0 pkg-name)
= =C2=A0 =C2=A0 (dolist (pkg-struct orig-ret)
=C2=A0 =C2=A0 =C2=A0 = (setq pkg-name (package-desc-name pkg-struct))
=C2=A0 =C2=A0 =C2= =A0 (if (member pkg-name pkg-black-list)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (message (concat "Package `%s' will not be installed. &= quot;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"See `modi/package-dependency-ch= eck-ignore'.")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0pkg-name)
=C2=A0 =C2=A0 =C2=A0 =C2=A0= ;; (message "Package to be installed: %s" pkg-name)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 (push pkg-struct new-ret)))
=C2=A0 = =C2=A0 new-ret))
(advice-add 'package-compute-transaction :fi= lter-return #'modi/package-dependency-check-ignore)


On Thu= , Mar 2, 2017 at 7:41 PM Tim Cross <theophilusx@gmail.com> wrote:
Is there a way to specify alter= native dependencies in a package?

Situation: installing a package is re= sulting in an additional package being installed even though the dependenci= es for the package have already been satisfied by another package. This res= ults in two packages being installed which provide overlapping functionalit= y.=C2=A0

Example. I have installed org-plus-contrib. I then insta= ll elfeed-org, which has a dependency on org. This results in the org packa= ge being installed, but org is already installed as part of the org-plus-co= ntrib package.=C2=A0

=
I'm trying to work out if this is a prob= lem 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

--001a11484ae02f7dfd0549ef71ae--