unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-devel@gnu.org
Subject: Re: GNU ELPA and package.el
Date: Mon, 08 Apr 2019 22:24:07 +0200	[thread overview]
Message-ID: <87tvf8fdp4.fsf@Rainer.invalid> (raw)
In-Reply-To: jwv36msxs3l.fsf-monnier+emacs@gnu.org

Stefan Monnier writes:
>> As I said, I'll happily make an exception for ELPA as long as it's
>> hobbled to not allow a proper build and provide any number of extra
>> pre-generated files that make up for the difference.  What I do not want
>> to do (Org maintainer override is possible) is to alter files from their
>> state in orgmode.git (i.e. if you delete the pre-generated files the
>> result should be identical to a checkout from orgmode.git).
>
> So you're OK with a convention of taking the version from one of the
> revision controlled files.  Good, since that's what we do.

…revision controlled file on ELPA.

> IOW the only problem is an unlucky collision between the choice made
> by GNU ELPA (to take the version from <pkg>.el) and the choice made by
> Org (to put the version elsewhere).

Well, Org would have to move it's main file out of the way and replace
it with a generated one just to accomodate ELPA.  That was (very)
briefly contemplated, but it still doesn't make sense.  What if the next
package archive wants it someplace else?

> I'm pretty sure it's much easier for Org to put the version where GNU
> ELPA expects it than for all elpa.git packages to change where they put
> their version.

Why is this more logical than using either the file that defines the
package (org-pkg.el) or the file that normally gets generated for Org
for this purpose (org-version.el)?  For those packages that don't
generate files falling back to the (usually single) file that names the
package is OK, but why not look for <PKG>{-pkg,-version,}.el in that
order in general?

>> What I'm trying to say is that users might easily find themselves in the
>> situation that requires them to ignore part of their system installation
>> (which they can't do anything about because somebody else provides it).
>
> Right, but I don't see what package.el can do about it.

Telling them about all available versions and where they come from would
be a start.  This would likely entail to name the various local package
directories, so they show up by name like the different package archives
already do.

>> While it is an unlikely case, I think it should still be possible.
>
> Obviously, they can't override everything that the sysadmin might do,
> but they can easily remove the system-wide package directory from
> package-directory-list, so AFAIK there's nothing harder about package.el
> packages than about anything else the sysadmin might do.

That's what I was trying to avoid.  If I remove the whole directory, I
then need to add back anything I _do_ want from it.  In more general
terms, currently the user only has ability to do positive selection and
I want her to have negative selection on the package level as well.

>>> One way we could do this is to always prefer the user-installed version
>>> over the system-wide one (tho, this will inevitably be somewhat brittle
>>> since we actually don't truly know which directories are "user" and
>>> which are "system", we can only approximate it e.g. by checking if we
>>> have write access or by declaring that package-user-dir is the only
>>> user directory and all others are system-wide).
>>
>> The order of all package directories provides a hierarchy already and in
>> most cases the highest rung should provide the definite information.
>> That part is mostly working already, I think.
>
> Not that I know: package.el currently doesn't pay much attention to the
> order of directories in package-directory-list.  It just gathers all the
> packages it finds there and activates the most recent version of each,
> by default.

What I meant was that the order of the various local package sources
(and possibly the order of foreign package archives) could be used to
indicate the general preference order, much like load-path does.

>>>> More generally, being able to "delete" a package at any level (or making
>>>> it completely invisible) is immensely useful for testing.
>>> I still don't know what you mean by "delete" here.
>> s/delete/mask/
>> Does that make more sense now?  I'd be happy if you find a better word
>> for it.
>
> Ah, I see.  Currently you can only do this by either disabling the
> package completely (i.e. all versions) or by explicitly selecting
> another version of that package (in both cases, this is done in
> `package-load-list`).

Yes.

>> So, let's say the system has a package "Foo" installed and the user
>> wants to install and use an older version of that.
>
> If we made package-user-dir packages always take precedence over
> system-wide packages, then this case is covered, right?

Yes, for this case this should work.  But the general precedence will
sometimes need to be modified on a per-package basis.  Which probably
would still work via package-load-list.  The tricky question is what
package menu should be doing if the user then asks for updates.  Any
exception should be sticky unless explicitly lifted, but it's not really
recorded what was a user decision and what was the result of automatic
resolution (other package managers keep tabs on this for exactly that
reason).

>> Another useful case is to pretend the builtin package "Bar" wasn't
>> there, lets say for testing purposes.
>
> I think this is going beyond the purpose of package.el.  To make it
> workable, we'd need to change the layout of Emacs's builtin files into
> many more directories, and I don't think we'll want to go there in
> general unless/until there's a really compelling reason for it.
>
> For the specific case of Org, we could arrange something.  Indeed, the
> most logical arrangement for Org (arguably) is to remove it from
> emacs.git and only include it in tarballs as a "bundled ELPA package",
> in which case it should indeed be possible to control it via
> package-load-list like any other.

Ideally anything not needed for dumping Emacs should be a proper package
(whether it's maintained in a different repository or not is orthogonal
to that).  It's probably not going to happen anytime soon, yes.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




  reply	other threads:[~2019-04-08 20:24 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-19 13:24 GNU ELPA package for CC-mode Stefan Monnier
2018-08-19 20:49 ` Alan Mackenzie
2018-08-19 23:45   ` Stefan Monnier
2018-08-20  8:24     ` Jostein Kjønigsen
2018-08-20 14:06       ` Stefan Monnier
2018-08-20 17:58         ` Jostein Kjønigsen
2018-08-21 13:30           ` Stefan Monnier
2018-08-21 16:20     ` Alan Mackenzie
2018-08-23  5:25       ` Stefan Monnier
2018-08-23 21:34         ` Alan Mackenzie
2018-08-23 22:17           ` Stefan Monnier
2018-08-24  8:43             ` Eli Zaretskii
2018-08-24 11:56               ` Michael Albinus
2018-08-24 22:21                 ` Stefan Monnier
2018-08-25  8:43                   ` Tramp as ELPA package (was: GNU ELPA package for CC-mode) Michael Albinus
2018-08-25 18:04                     ` Tramp as ELPA package Stefan Monnier
2018-08-25 21:04                       ` Stefan Monnier
2018-08-26  6:39                         ` Andreas Schwab
2018-08-26 10:48                           ` Michael Albinus
2018-08-26 11:09                         ` Michael Albinus
2018-08-26 15:21                           ` Stefan Monnier
2018-08-26 18:04                             ` Michael Albinus
2018-08-26 18:27                               ` Eli Zaretskii
2018-08-26 18:34                                 ` Michael Albinus
2018-08-26 19:03                                   ` Eli Zaretskii
2018-08-27  7:12                                     ` Michael Albinus
2018-08-27 13:33                                       ` Stefan Monnier
2018-08-27 13:41                                         ` Michael Albinus
2018-08-27 13:44                                           ` Stefan Monnier
2018-08-27 15:22                                             ` Michael Albinus
2018-08-27 15:09                                       ` Eli Zaretskii
2018-08-27 15:21                                         ` Michael Albinus
2018-08-26 15:30                           ` Tom Tromey
2018-08-26 16:26                             ` Stefan Monnier
2018-08-26 17:46                             ` Michael Albinus
2019-04-04 12:41                           ` Michael Albinus
2019-04-04 15:48                             ` Stefan Monnier
2019-04-04 16:07                               ` Michael Albinus
2019-04-05 14:43                               ` Michael Albinus
2019-04-05 15:07                                 ` Dmitry Gutov
2019-04-05 16:19                                   ` Michael Albinus
2019-04-16  7:53                                     ` Steinar Bang
2019-04-05 18:14                                 ` Stephen Leake
2019-04-05 18:20                                   ` Stephen Leake
2019-04-05 22:18                                     ` Michael Albinus
2019-04-07  0:17                                       ` Stephen Leake
2019-04-07  7:41                                         ` Michael Albinus
2019-04-06 12:42                                 ` Stefan Monnier
2019-04-08 12:37                                   ` Michael Albinus
2019-04-08 13:07                                     ` Stefan Monnier
2019-04-08 13:31                                       ` Michael Albinus
2019-04-08 16:43                                         ` Stefan Monnier
2019-05-20 13:05                                       ` Michael Albinus
2019-06-30 19:20                                         ` Michael Albinus
2019-04-05 18:55                               ` Achim Gratz
2019-04-06 22:25                                 ` GNU ELPA and package.el (was: Tramp as ELPA package) Stefan Monnier
2019-04-07  7:17                                   ` GNU ELPA and package.el Achim Gratz
2019-04-07 14:07                                     ` Stefan Monnier
2019-04-07 17:37                                       ` Achim Gratz
2019-04-07 20:31                                         ` Stefan Monnier
2019-04-08 17:55                                           ` Achim Gratz
2019-04-08 19:01                                             ` Stefan Monnier
2019-04-08 20:24                                               ` Achim Gratz [this message]
2019-04-09  1:39                                                 ` Stefan Monnier
2018-08-25 19:15                   ` GNU ELPA package for CC-mode Clément Pit-Claudel
2018-08-25 20:17                     ` Stefan Monnier
2018-08-25 21:17                       ` Tom Tromey
2018-08-25 23:28                         ` Kyle Andrews
2018-08-24 15:48               ` Stefan Monnier
2018-08-24 19:21                 ` Eli Zaretskii
2018-08-24 22:17               ` Stefan Monnier
2018-08-25  7:02                 ` Eli Zaretskii
2018-08-25  8:51                 ` Alan Mackenzie
2018-08-25 10:15                   ` Michael Albinus
2018-08-25 18:07                   ` Stefan Monnier
2018-08-25 18:27                     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87tvf8fdp4.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).