unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jorgen Schaefer <forcer@forcix.cx>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 19296@debbugs.gnu.org
Subject: bug#19296: [PATCH] Package archives now have priorities.
Date: Sun, 7 Dec 2014 19:21:05 +0100	[thread overview]
Message-ID: <20141207192105.48c4c41b@forcix> (raw)
In-Reply-To: <jwv8uijqroj.fsf-monnier+emacsbugs@gnu.org>

On Sun, 07 Dec 2014 12:56:53 -0500
Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > When installing packages by name, only packages from archives with
> > the highest priority are considered, before versions are compared.
> 
> What can this be used for (other than the MELPA case, obviously)?

Local/site-wide package archives that provide specific versions for
packages that are required by the site that should not be overridden by
external sources. (Can be emulated by pinning them.)

Adding archives that provide testing or debugging packages which should
not be installed by default, but can be installed by the user if they
want to. (Can be emulated by adding the archive only for the duration
of installing those packages.)

More generally, the use cases are either very similar to the existing
"pinning" functionality, or to adding archives only temporarily, except
the interface is easier to the user and does not require constant
manual work.

> > This solves the "MELPA problem", where MELPA assigns date-based
> > version numbers to packages which override all other archives.
> > Giving MELPA a lower priority means packages are installed from
> > MELPA only when the package is not available from other archives.
> 
> I think the better way to solve the problem of versioning the
> "bleeding edge package" would be to take the base version and tuck
> the date to it (instead of only using the date).
> I.e. file names like foo-mode-1.3.0.20141023.tar.gz where "1.3" is the
> version of the last release.
> 
> Of course that requires a change on MELPA side and I have no idea how
> easy/feasible that would be.  And I'm not completely sure it would
> really be the best option either.

This is not easy for the general MELPA, as not all packages have
version numbers at all, but certainly feasible for MELPA stable.

My patch that would have added this was rejected:

https://github.com/milkypostman/melpa/pull/1771

The version number issues has been raised a few times, and it does not
seem likely to get fixed any time soon.

> > This can be overridden manually by the user.
> 
> An important issue is what happens after the user did such an
> override. In my above suggestion, the behavior would kind of suck
> since package-list would then constantly recommend "upgrading" to the
> official release (since 1.3 is "more uptodate" than "0.0.YYYYMMDD").

Good point. The correct implementation here would likely move the
sorting by version number out of the `package--add-to-archive-contents'
function and into the various users of `package-archive-contents',
which should sort the list depending on their use case. This is a
breaking API change and likely a good deal more work.

Would a patch that does that be more acceptable?

Regards,
Jorgen





  reply	other threads:[~2014-12-07 18:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-07 12:31 bug#19296: [PATCH] Package archives now have priorities Jorgen Schaefer
2014-12-07 16:07 ` Ted Zlatanov
2014-12-07 17:56 ` Stefan Monnier
2014-12-07 18:21   ` Jorgen Schaefer [this message]
2014-12-07 20:00     ` Jorgen Schaefer
2014-12-08  2:48       ` Stefan Monnier
2014-12-08 10:58         ` Jorgen Schaefer
2014-12-08 15:42           ` Stefan Monnier
2014-12-08 18:49             ` Jorgen Schaefer
2014-12-15  4:59               ` Stefan Monnier
2014-12-15  8:36                 ` Jorgen Schaefer
2014-12-15 12:08                   ` Ted Zlatanov
2014-12-15 14:52                   ` Stefan Monnier
2014-12-15 14:55                     ` Jorgen Schaefer
2014-12-15 19:07                       ` Stefan Monnier
2014-12-07 18:55   ` Achim Gratz
2014-12-08  2:45     ` Stefan Monnier
2014-12-08  7:22       ` Achim Gratz
2014-12-07 21:28 ` Jorgen Schaefer
2014-12-07 21:46   ` Jorgen Schaefer
     [not found] <<20141207132244.A14A7200D1E@loki.jorgenschaefer.de>
2014-12-07 14:19 ` Drew Adams
2014-12-07 14:43   ` Jorgen Schaefer
2014-12-07 15:55     ` Drew Adams
2014-12-07 16:10       ` Jorgen Schaefer
2014-12-07 18:16         ` Drew Adams
2014-12-07 16:13       ` Ted Zlatanov
2014-12-07 17:41   ` Stefan Monnier
     [not found] ` <<20141207214345.A8216200D2E@loki.jorgenschaefer.de>
2014-12-07 22:27   ` Drew Adams

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=20141207192105.48c4c41b@forcix \
    --to=forcer@forcix.cx \
    --cc=19296@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).