[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last ch
From: |
Philip Kaludercic |
Subject: |
Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change. |
Date: |
Wed, 10 May 2023 06:59:46 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: dmitry@gutov.dev, monnier@iro.umontreal.ca, emacs-devel@gnu.org
>> Date: Mon, 08 May 2023 13:34:26 +0000
>>
>> >> At least nadvice, cl-lib and cl-generic seem to be the odd ones (the
>> >> built-in versions are higher, and the ELPA packages are supposed to be
>> >> used as shims or backward compatibility wrappers). That looks like a bug.
>>
>> I think you are right, I can extend my previous patch by a version check.
>
> Good idea, IMO.
OK, then this is my proposal:
>From 8d78dc4ab9cb188f62c656d6d55326240816f8c6 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Wed, 10 May 2023 08:58:34 +0200
Subject: [PATCH] Ensure that package menu respects
'package-install-upgrade-built-in'
* lisp/emacs-lisp/package.el (package-menu--find-upgrades): Check if
built-in packages can be upgraded if
'package-install-upgrade-built-in' is non-nil.
---
lisp/emacs-lisp/package.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 9476354ebe0..7f94ed2e57b 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -3731,7 +3731,9 @@ package-menu--find-upgrades
;; ENTRY is (PKG-DESC [NAME VERSION STATUS DOC])
(let ((pkg-desc (car entry))
(status (aref (cadr entry) 2)))
- (cond ((member status '("installed" "dependency" "unsigned"
"external"))
+ (cond ((member status (append
+ '("installed" "dependency" "unsigned"
"external" "built-in")
+ (and package-install-upgrade-built-in
'("built-in"))))
(push pkg-desc installed))
((member status '("available" "new"))
(setq available (package--append-to-alist pkg-desc
available))))))
@@ -3740,8 +3742,11 @@ package-menu--find-upgrades
(let* ((name (package-desc-name pkg-desc))
(avail-pkg (cadr (assq name available))))
(and avail-pkg
- (version-list-< (package-desc-priority-version pkg-desc)
- (package-desc-priority-version avail-pkg))
+ (and (version-list-< (package-desc-priority-version pkg-desc)
+ (package-desc-priority-version avail-pkg))
+ (if package-install-upgrade-built-in
+ (package--active-built-in-p pkg-desc)
+ t))
(push (cons name avail-pkg) upgrades))))
upgrades))
--
2.39.2
This also reduced the number of packages that are suggested for an
upgrade to only 5 (on Emacs 29).
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., (continued)
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Philip Kaludercic, 2023/05/07
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Eli Zaretskii, 2023/05/07
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Philip Kaludercic, 2023/05/07
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Eli Zaretskii, 2023/05/07
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Philip Kaludercic, 2023/05/07
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Eli Zaretskii, 2023/05/08
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Eli Zaretskii, 2023/05/12
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Eli Zaretskii, 2023/05/08
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Philip Kaludercic, 2023/05/08
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Eli Zaretskii, 2023/05/08
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change.,
Philip Kaludercic <=
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Philip Kaludercic, 2023/05/10
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Eli Zaretskii, 2023/05/10
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Ruijie Yu, 2023/05/10
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Philip Kaludercic, 2023/05/11
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Dmitry Gutov, 2023/05/10
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Philip Kaludercic, 2023/05/11
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Dmitry Gutov, 2023/05/11
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Eli Zaretskii, 2023/05/11
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Philip Kaludercic, 2023/05/12
- Re: emacs-29 9b775ddc057 1/2: ; * etc/EGLOT-NEWS: Fix wording of last change., Dmitry Gutov, 2023/05/07