unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, 63757@debbugs.gnu.org, artscan@list.ru
Subject: bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path
Date: Mon, 05 Jun 2023 07:55:46 +0000	[thread overview]
Message-ID: <87ttvmbawt.fsf@posteo.net> (raw)
In-Reply-To: <jwvbkhv6n7m.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 04 Jun 2023 15:38:07 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Just to make sure I am not missing something in that case:
>> package-load-all-descriptors reads package descriptors either in
>> alphabetical order or in the order the operating system will list them
>> in the elpa/ directory.  Via package-load-descriptor, the descriptor
>> expression is passed to the package-process-define-package, which will
>> insert them into package-alist according to the version number.
>
> That's right.
>
>> If this is so, then if the package developer does not bump the commit to
>> something else after releasing the package on GNU ELPA, then order of
>> the VC package vs. the tarball package would depend on order in which
>> they are returned from via `directory-files', since their version
>> according to `version-list-=' would be the same?
>
> If two installed packages have the same version, then indeed the sort
> order between them is "arbitrary" (it currently happens to put in first
> position the first package encountered, which may depend on the
> directory-files sort order but also on the order the packages are found
> along `package-directory-list` if they're not in the same dir).

Ok.

> So, to better handle the scenario you describe, we'd need/want something
> like the 100% untested patch below.
>
>
>         Stefan
>
>
> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index ba0e3618f28..01936a4fe0a 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -698,8 +698,10 @@ package-process-define-package
>          ;; If there is, insert the new package at the right place in the list.
>          (while
>              (if (and (cdr old-pkgs)
> -                     (version-list-< version
> -                                     (package-desc-version (cadr old-pkgs))))
> +                     (let ((oversion (package-desc-version (cadr old-pkgs)))))
> +                     (or (version-list-< version oversion)
> +                         (and (equal version oversion)
> +                              (package-vc-p new-pkg-desc))))

But in this case, if a regular package is upgraded, and a VC package
weren't (even though the user might have written some patch they are
relying on), it would be suddenly switch when starting up Emacs at some
point.

>                  (setq old-pkgs (cdr old-pkgs))
>                (push new-pkg-desc (cdr old-pkgs))
>                nil)))





  reply	other threads:[~2023-06-05  7:55 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-27 16:30 bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-29 11:09 ` Eli Zaretskii
2023-05-29 14:24   ` Philip Kaludercic
2023-06-03 10:19     ` Philip Kaludercic
2023-06-03 10:38       ` Eli Zaretskii
2023-06-03 11:50         ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 12:53           ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 13:33             ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03 14:06       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  4:46         ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  5:37           ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  5:41             ` Eli Zaretskii
2023-06-04  7:47               ` Philip Kaludercic
2023-06-04  8:03                 ` Eli Zaretskii
2023-06-04  9:19                   ` Philip Kaludercic
2023-06-04 10:14                     ` Eli Zaretskii
2023-06-04 11:39                       ` Philip Kaludercic
2023-06-04 12:08                         ` Eli Zaretskii
2023-06-04 12:12                           ` Philip Kaludercic
2023-06-04 12:19                             ` Eli Zaretskii
2023-06-04 12:32                               ` Philip Kaludercic
2023-06-04 12:46                                 ` Eli Zaretskii
2023-06-04 13:21                                   ` Philip Kaludercic
2023-06-04 14:03                                     ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:24                                       ` Philip Kaludercic
2023-06-04 14:30                                       ` Eli Zaretskii
2023-06-04 14:47                                         ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:55                                           ` Eli Zaretskii
2023-06-04 16:36                                             ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 15:12                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 15:20                                         ` Eli Zaretskii
2023-06-04 15:47                                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 16:15                                             ` Philip Kaludercic
2023-06-04 16:30                                               ` Eli Zaretskii
2023-06-04 16:53                                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 17:37                                                   ` Philip Kaludercic
2023-06-04 18:32                                                     ` Eli Zaretskii
2023-06-04 16:44                                               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 18:40                                                 ` Philip Kaludercic
2023-06-04 19:38                                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-05  7:55                                                     ` Philip Kaludercic [this message]
2023-06-05 14:55                                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-07 15:36                                                         ` Eli Zaretskii
2023-06-07 18:38                                                           ` Philip Kaludercic
2023-06-07 19:20                                                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-08  9:26                                                               ` Eli Zaretskii
2023-06-04 16:28                                             ` Eli Zaretskii
2023-06-04 15:45                                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:46                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:54                                     ` Eli Zaretskii
2023-06-04 15:03                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 12:14                           ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  7:52               ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  8:06                 ` Eli Zaretskii
2023-06-04  8:43                   ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  8:54                     ` Eli Zaretskii
2023-06-04  9:10                       ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04  9:17                       ` Philip Kaludercic
2023-06-04 10:16                         ` Eli Zaretskii
2023-06-04  9:52                       ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 14:54           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-29 13:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-29 15:44   ` Евгений Бойков via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-30  2:44     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-03  8:37       ` 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=87ttvmbawt.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=63757@debbugs.gnu.org \
    --cc=artscan@list.ru \
    --cc=eliz@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).