From: Jonas Bernoulli <jonas@bernoul.li>
To: Radon Rosborough <radon.neon@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Interoperation between package managers
Date: Sat, 12 Aug 2017 22:53:01 +0200 [thread overview]
Message-ID: <877ey8cxua.fsf@bernoul.li> (raw)
In-Reply-To: <CADB4rJE-urpOCXOvRGxYqmGShkTQQzh-DZgY8roXhM94ixTReA@mail.gmail.com>
>> As mentioned above, I haven't thought about what package.el could do
>> to make it easier to automate what I do manually, so if you have
>> suggestions for things that we could change in (or add to)
>> package.el to make it easier for Borg to interoperate with it,
>> please send them along,
>
> You should talk to Jonas (cc'd) about this as he's the author of Borg.
> I can't really provide much useful help beyond this point since I have
> no desire to use package.el for anything.
(This has gotten a bit long, you may
skip to "What Borg needs from package.el".)
I would like to eventually allow users to use Borg alongside package.el.
The idea behind Borg is that for some people using a package is only the
first step, the second is to contribute to it.
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'.
That works surprisingly well, because most packages follow some informal
common sense conventions. But Borg also has features to deal with
packages that stray for the common path. The main difference from other
package managers is that in the case of Borg, those packages are not
brought into line at the time a package is created (because there is
neither a "package" not a "package maintainer" just the upstream git
repository). But like Melpa or El-Get, Bort does support "recipes"; the
only difference is when and where the recipe is "applied". In the case
of Borg it is applied on the users machine at the time of installation
(and update).
So as I said, Borg is primarily intended for people who contribute to
many of the package that they use. In that sense it is similar to
adding the local clone of elpa.git to `package-directory-list. One big
difference though is that in the case of Borg each package continues to
live in its own repository.
It is already possible to use Borg and package at the same time, but I
intend to make it a fully supported use-case. All you have to (and can)
do currently to use both package managers at the same time is to
preserve this order in the init file:
(package-initialize)
(borg-initialize)
This guarantees that Borg wins in case a package is installed using both
package.el and Borg. This allows users to install most packages using
package.el and only install the packages that they contribute to using
Borg. The main benefit of using Borg to *install* some packages instead
of just *using* the package.el-installed version and *working* in a
manually cloned git repository, is that after restarting Emacs, the
locally modified version is loaded without having to manually adjust
the `load-path'.
Of course there are other benefits, for example `borg-install' only
needs the name of a package because it knows the location of thousands
of upstream repositories. `magit-clone' on the other hand expects an
url.
In addition to cloning package repositories, it adds the clones as git
submodules of the ~/.emacs.d repository. This makes sense if one only
uses Borg, but when also using package.el then probably not so much.
This is the main change required on Borg's side to make it more useful
for people who also use package.el. (It is already possible to clone a
package repository without adding it as a submodule, but currently this
also means that Borg forgoes actually installing the package by
compiling it and adding it to the `load-path'.
---
What Borg needs from package.el?
If you initialize package.el before Borg, then the Borg-installed
version of a package shadows the package.el-installed version. It would
be nicer if package.el could be told "this is a list of packages that
are somehow installed, do not install those packages, just assume they
are available".
I don't think that adding the directory that contains the Borg-installed
packages to `package-directory-list' would do because:
* 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.)
* 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 ./.
So really, all that Borg needs is option `package-assume-installed'.
Maybe that already exists, I haven't checked, because I haven't actually
gotten around to making Borg package.el compatible yet.
---
And since that is what started this whole conversation, I should note
that I don't really care that users who use Borg exclusively have to put
(setq package-enable-at-startup nil)
in their init file. While I haven't followed this conversation, I have
thought a bit about how package.el is initialized, and can appreciate
how the current solution has grown out of necessity. It tries to
satisfy users with very different needs and especially varying levels of
understanding.
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. It would nice if `package-initialize'
did not do that and would only *update* the local metadata if it is
already there. Later when the user calls `package-list-package' or
`package-install', then the initial local copy of the metadata could be
downloaded.
But package.el is not unique in this regard. When I use `emacs -Q',
then some other build in packages also create files in ~/.emacs.d that
would be different places if my personal init.el had been loaded. I
can live with that and just cleanup manually after an `emacs -Q'.
next prev parent reply other threads:[~2017-08-12 20:53 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 [this message]
2017-08-13 21:43 ` Stefan Monnier
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=877ey8cxua.fsf@bernoul.li \
--to=jonas@bernoul.li \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=radon.neon@gmail.com \
/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.