all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Interoperation between package managers
Date: Sun, 13 Aug 2017 17:43:39 -0400	[thread overview]
Message-ID: <jwvmv73p375.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 877ey8cxua.fsf@bernoul.li

> 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
.../<pkg>/lisp rather than to .../<pkg>/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 <pkg>-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 <pkg>-autoloads.el; and the code in <pkg>-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




  reply	other threads:[~2017-08-13 21:43 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07  0:37 Friendly discussion about (package-initialize) Radon Rosborough
2017-08-07  1:39 ` Stefan Monnier
2017-08-07  2:16   ` Radon Rosborough
2017-08-07  2:44     ` Stefan Monnier
2017-08-07  4:12       ` Radon Rosborough
2017-08-09 20:24         ` Stefan Monnier
2017-08-10  3:32           ` Radon Rosborough
2017-08-10  4:25             ` Eli Zaretskii
2017-08-10  4:39               ` Radon Rosborough
2017-08-10  7:24                 ` Eli Zaretskii
2017-08-10 17:06                   ` Radon Rosborough
2017-08-10 19:08                     ` Eli Zaretskii
2017-08-10 19:31                       ` Radon Rosborough
2017-08-10 20:00                       ` Mark Oteiza
2017-08-11  6:14                         ` Eli Zaretskii
2017-08-11  1:25                     ` Nick Helm
2017-08-11 21:43                       ` Stefan Monnier
2017-08-09 20:35         ` Interoperation between package managers (was: Friendly discussion about (package-initialize)) Stefan Monnier
2017-08-10  3:54           ` Radon Rosborough
2017-08-10 21:34             ` Interoperation between package managers Stefan Monnier
2017-08-11  2:14               ` Radon Rosborough
2017-08-11 22:05                 ` Stefan Monnier
2017-08-12 17:54                   ` Radon Rosborough
2017-08-12 20:53                     ` Jonas Bernoulli
2017-08-13 21:43                       ` Stefan Monnier [this message]
2017-08-13 21:25                     ` Stefan Monnier
2017-08-13 22:42                       ` Radon Rosborough
2017-08-13 23:32                         ` Stefan Monnier
2017-08-14  0:29                           ` Radon Rosborough
2017-08-14  8:02                             ` Stefan Monnier
2017-08-23 19:39             ` Nikolay Kudryavtsev
2017-08-23 20:58               ` Radon Rosborough
2017-08-24 12:36                 ` Nikolay Kudryavtsev
2017-08-24 20:11                   ` Radon Rosborough
2017-08-25 14:31                     ` Nikolay Kudryavtsev
2017-08-24 15:04               ` Ted Zlatanov
2017-08-24 15:46                 ` Nikolay Kudryavtsev
2017-08-07  3:20   ` Friendly discussion about (package-initialize) Noam Postavsky
2017-08-07  4:14   ` Mark Oteiza
2017-08-08  0:47     ` Stefan Monnier
2017-08-10 20:15       ` Mark Oteiza
2017-08-10 21:29         ` Stefan Monnier
2017-08-11  1:14           ` Mark Oteiza
2017-08-11  8:03             ` Clément Pit-Claudel
2017-08-07  6:52 ` Colin Baxter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvmv73p375.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.