From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Package.el and specifying alternative dependencies Date: Sun, 5 Mar 2017 10:44:12 +1100 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c06f3344c886f0549f03d82 X-Trace: blaine.gmane.org 1488671066 11474 195.159.176.226 (4 Mar 2017 23:44:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2017 23:44:26 +0000 (UTC) Cc: Emacs developers To: Kaushal Modi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 05 00:44:21 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 1ckJLW-00028F-8b for ged-emacs-devel@m.gmane.org; Sun, 05 Mar 2017 00:44:18 +0100 Original-Received: from localhost ([::1]:37017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckJLc-0002fM-Dh for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2017 18:44:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckJLS-0002cv-QJ for emacs-devel@gnu.org; Sat, 04 Mar 2017 18:44:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckJLR-0003DU-Kf for emacs-devel@gnu.org; Sat, 04 Mar 2017 18:44:14 -0500 Original-Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:35266) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckJLR-0003DE-Fq for emacs-devel@gnu.org; Sat, 04 Mar 2017 18:44:13 -0500 Original-Received: by mail-qk0-x229.google.com with SMTP id v125so47202479qkh.2 for ; Sat, 04 Mar 2017 15:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3FKEbdBWRPfiM6tdW2Bx3AWzu/qmlz0/fd9LtjvrBCo=; b=jtRQrLGgdFD/3hlAPiWtwGeDZxKSbtZKJEylSOeaTZi61FFAyz5dr7AbkwnVoWoywJ y4vXd2ThOQY+mLRI3bvKsXjLrxBHxJhEZSPC3+YW/lp6JjYBdGf3mLdzDoSHikKDXNn0 u17AxwHh9YvwnomQmJJulcJOqsCCXJBbs5HEFT9Zwbe/DMpzl5/Kh7PJHqd8n+aHP54k fJBnISSqsOQbn/aOUGVU638wm//t+euZ4LRl/B+m7ttT0f5xRBfvEUoX4D7kBTsMf8+8 ZYGPfxXk1sYeXlQ+S99dqE/3LGx6NK5MxuKn10gs7JCKKqicahD8p21VhVP8L1IVSQBp UQ6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3FKEbdBWRPfiM6tdW2Bx3AWzu/qmlz0/fd9LtjvrBCo=; b=To0o4PJ165lsHjNeNk0H14N4fzgnRUn4reMrH/n+4Swi4NQqQsJFWSkEcc8j0PfPie JLRcmmSISrTAWdzWMYjPG3oFdE0oboYsJcqVVpRQVWq+UYujOUO6hr8Y5WuNOxKM3ZM+ TlHTbanzj3xPacliOODgxxz6z3wpx4DkWI3DMwjsH2NsF0E5b6D35UUUg27QJIP7F4ma iRebcRiqX+g3cSfB3RNjOdg4ruSyuywVzi6ckeJdIqYM88BbeVImKT26xKnaaKYofPmE dRVnqzXbBQFX4FVIoBHk5C0hxDek/Pzdj5mO4ngxfLI69iLcXYucgp/e4TdG95WFjx9s 2NeQ== X-Gm-Message-State: AMke39kpYnTRYo2uDfAr9BugWatrgwyR0FJuURcSUDf6otuYWVgnI6dYjZq0Nf8YeYUXU+sXOmh6XzgzVM6eOQ== X-Received: by 10.55.180.129 with SMTP id d123mr8891365qkf.158.1488671052955; Sat, 04 Mar 2017 15:44:12 -0800 (PST) Original-Received: by 10.237.44.98 with HTTP; Sat, 4 Mar 2017 15:44:12 -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:400d:c09::229 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:212756 Archived-At: --94eb2c06f3344c886f0549f03d82 Content-Type: text/plain; charset=UTF-8 Nice and useful idea. thanks On 5 March 2017 at 09:46, Kaushal Modi 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. > > ;; 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 > -- regards, Tim -- Tim Cross --94eb2c06f3344c886f0549f03d82 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Nice and useful idea.=C2=A0

thanks

On 5 March= 2017 at 09:46, Kaushal Modi <kaushal.modi@gmail.com> w= rote:
I have this in my = config which works very well. I use this just for org :) I build org from i= ts master branch, so I do not want the dependency check to auto-install old= er versions from Elpa.

(defun modi/package-dependency-check-ignore (orig-ret)
=C2=A0 "Remove the `black listed package= s' from ORIG-RET.
Packages listed in the let-bound `pkg-black= -list' will not be auto-installed
even if they are found as d= ependencies.
It is known that this advice is not effective when i= nstalled packages
asynchronously using `paradox'. Below is ef= fective on synchronous
package installations."
=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 p= kg-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. "
=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-chec= k-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 :filte= r-return #'modi/package-dependency-check-ignore)


On Thu, Mar 2, 2017 at 7:41 PM Tim= Cross <theop= hilusx@gmail.com> wrote:
Is there a way to s= pecify alternative dependencies in a package?

Situation: installing a package is= resulting in an additional package being installed even though the depende= ncies for the package have already been satisfied by another package. This = results in two packages being installed which provide overlapping functiona= lity.=C2=A0

Example. I have installed org-plus-contrib. I then install e= lfeed-org, which has a dependency on org. This results in the org package b= eing installed, but org is already installed as part of the org-plus-contri= b package.=C2=A0

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 kno= w in order to determine where this issue needs to be logged.
--

Kaushal Modi




--
regards,

Tim

--
Tim Cross

--94eb2c06f3344c886f0549f03d82--