From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Interoperation between package managers Date: Sun, 13 Aug 2017 17:43:39 -0400 Message-ID: References: <877ey8cxua.fsf@bernoul.li> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1502660651 8103 195.159.176.226 (13 Aug 2017 21:44:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 13 Aug 2017 21:44:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 13 23:44:07 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 1dh0fy-0001XC-Tf for ged-emacs-devel@m.gmane.org; Sun, 13 Aug 2017 23:44:03 +0200 Original-Received: from localhost ([::1]:37957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dh0g3-0008RX-Mg for ged-emacs-devel@m.gmane.org; Sun, 13 Aug 2017 17:44:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dh0fw-0008Qn-2j for emacs-devel@gnu.org; Sun, 13 Aug 2017 17:44:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dh0fq-0004G1-IS for emacs-devel@gnu.org; Sun, 13 Aug 2017 17:44:00 -0400 Original-Received: from [195.159.176.226] (port=48769 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dh0fq-0004Fb-BV for emacs-devel@gnu.org; Sun, 13 Aug 2017 17:43:54 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dh0fc-0000PO-HV for emacs-devel@gnu.org; Sun, 13 Aug 2017 23:43:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 67 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:24EPlkVFUHvKweWhK6pnUD7FcvA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:217521 Archived-At: > Borg installs packages by cloning the respective git repository and then > byte-compiling the libraries, generating the autoload file, generating > the info files, and adding the appropriate directories to `load-path' > and `Info-directory-list'. Right, that's similar to what I do by adding the git clone as a symlink in .../elpa/packages. > That works surprisingly well, because most packages follow some informal > common sense conventions. That's indeed my experience as well. > I don't think that adding the directory that contains the Borg-installed > packages to `package-directory-list' would do because: [ Which is indeed the way I'd naturally/naively see it integrated ] > * That would cause package.el to load those packages, resulting in them > being loaded twice. (At least they would be added to the `load-path' > twice.) Why loaded twice? Do you mean because package-initialize does it once and then borg-initialize does it a second time? If so, then I'd suggest to change Borg so it doesn't do it (and relies on package.el to do it instead). > * While some of these directories follow the format expected by > package.el, others do not. For example in many repositories libraries > live in ./lisp/ instead of ./. Currently I deal with this by making the symlink point to the ...//lisp rather than to ...//lisp. This also works for cases where git clone gives me a large package which includes some Elisp support package inside (typically the git repository for a new language, which includes a compiler along with some support code for various editors). There's been some efforts to extend package.el so it can better handle .el files in subdirectories, but there's more work to do there. But normally the way a package is activated by package.el is just by loading -autoloads.el so that can deal just fine with the case where the .el files are in .../lisp: it's the responsibility of the code that installs the package to compile the files in .../lisp and to setup the autoloas in -autoloads.el; and the code in -autoloads.el can add the .../lisp dir to load-path rather than the top-level dir. > The only thing that annoys me a bit is that when I use `emacs -Q' to > debug some issue without my configuration, then I end up with > ~/.emacs.d/elpa being created. Sounds like a bug, indeed. Could you M-x report-emacs-bug with a recipe to reproduce it? > It would nice if `package-initialize' did not do that and would only > *update* the local metadata if it is already there. AFAIK package-initialize doesn't update any local metadata. > Later when the user calls `package-list-package' or `package-install', > then the initial local copy of the metadata could be downloaded. That's what happens, AFAIK. Stefan