[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63757: 29.0.91 order of package paths changed: random old versions o
From: |
Philip Kaludercic |
Subject: |
bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path |
Date: |
Wed, 07 Jun 2023 18:38:49 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Stefan Monnier <monnier@iro.umontreal.ca>
>> Cc: Eli Zaretskii <eliz@gnu.org>, artscan@list.ru, 63757@debbugs.gnu.org
>> Date: Mon, 05 Jun 2023 10:55:50 -0400
>>
>> > 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.
>>
>> Yup. AFAIK both behaviors (staying with the VC package, and
>> switching to the non-VC package) can be "incorrect", depending on
>> the circumstances. So I don't see this as "a bug".
>>
>> Note also that in the session where we perform the install of the
>> upgraded package, the upgraded package will take precedence over the VC
>> package, so it's mildly more consistent to do the same at startup.
>>
>> If the user wants to keep using the older VC package, there's always to
>> option to use `package-pinned-packages` or to remove the non-VC package.
>>
>> If we want to do better, rather than forcing VC packages to the top we
>> should detect when the ordering between VC and non-VC packages changes
>> and emit a warning or prompt the user.
>
> So what's the bottom line here? Do we have an agreed-upon patch that
> should be installed on the emacs-29 branch? If so, can it be
> installed soon, please? Because I'd like to put out another Emacs 29
> pretest in a couple of days.
I think that Stefan's suggestion is the best way to go forward for now:
>From f47c9cdfa4f55a168246bd4fc19ad6c897e8906b Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Wed, 7 Jun 2023 20:37:13 +0200
Subject: [PATCH] ; Restore old behaviour of 'package--get-activatable-pkg'
* lisp/emacs-lisp/package.el (package--get-activatable-pkg): Do not
sort 'package-alist' to prefer VC packages. (Bug#63757)
---
lisp/emacs-lisp/package.el | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 43368b59522..3e6acd9b388 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -924,22 +924,14 @@ package-activate-1
(defun package--get-activatable-pkg (pkg-name)
;; Is "activatable" a word?
- (let ((pkg-descs (sort (cdr (assq pkg-name package-alist))
- (lambda (p1 p2)
- (let ((v1 (package-desc-version p1))
- (v2 (package-desc-version p2)))
- (or
- ;; Prefer VC packages.
- (package-vc-p p1)
- (package-vc-p p2)
- ;; Prefer builtin packages.
- (package-disabled-p p1 v1)
- (not (package-disabled-p p2 v2))))))))
+ (let ((pkg-descs (cdr (assq pkg-name package-alist))))
;; Check if PACKAGE is available in `package-alist'.
(while
(when pkg-descs
(let ((available-version (package-desc-version (car pkg-descs))))
- (package-disabled-p pkg-name available-version)))
+ (or (package-disabled-p pkg-name available-version)
+ ;; Prefer a builtin package.
+ (package-built-in-p pkg-name available-version))))
(setq pkg-descs (cdr pkg-descs)))
(car pkg-descs)))
--
2.39.2
> If there's no agreement yet, can someone please spell out what is yet
> to be done here?
>
> Thanks.
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, (continued)
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Stefan Monnier, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Philip Kaludercic, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Stefan Monnier, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Philip Kaludercic, 2023/06/05
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Stefan Monnier, 2023/06/05
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Eli Zaretskii, 2023/06/07
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path,
Philip Kaludercic <=
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Stefan Monnier, 2023/06/07
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Eli Zaretskii, 2023/06/08
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Eli Zaretskii, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Stefan Monnier, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Stefan Monnier, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Eli Zaretskii, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Stefan Monnier, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Евгений Бойков, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Евгений Бойков, 2023/06/04
- bug#63757: 29.0.91 order of package paths changed: random old versions of packages in load-path, Eli Zaretskii, 2023/06/04