Subject: bug#76567: 30.1; package-install-upgrade-built-in upgrades built-ins to the same version

From: Ship Mints <[email-masked]>
Date: Wed, 26 Feb 2025 10:45:20 -0500

e.g., Emacs 30.1 embeds project.el:

;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Version: 0.11.1
;; Package-Requires: ((emacs "26.1") (xref "1.7.0"))

The not-newer version package downloaded from the archives:

;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
;; Version: 0.11.1
;; Package-Requires: ((emacs "26.1") (xref "1.7.0"))

On Wed, Feb 26, 2025 at 10:41 AM Ship Mints <[email-masked]> wrote:

> "replace with newer versions from the archives" is not what's happening.
> It seems to replace with identical versions, just from the archives.
>
> On Wed, Feb 26, 2025 at 10:39 AM Philip Kaludercic <[email-masked]>
> wrote:
>
>> Eli Zaretskii <[email-masked]> writes:
>>
>> >> From: Ship Mints <[email-masked]>
>> >> Date: Tue, 25 Feb 2025 15:35:10 -0500
>> >>
>> >> As part of my production upgrade to 30.1, I wrote a program to install
>> >> my local ELPA tree from scratch, and take the opportunity to prune and
>> >> curate packages.
>> >>
>> >> One thing that surprised me, that I didn't notice in 29.4, is that if
>> >> 'package-install-upgrade-built-in' is non-nil, 'package-list-packages'
>> >> reports built-ins needing upgrades from ELPA but to the *identical
>> >> versions* in the 30.1 tree.  I was expecting upgrades to be actual
>> >> upgrades, not side-grades, as they say.  The reason I didn't see
>> >> this on 29.4, is that the distro versions were older than ELPA so I
>> >> was happy to take the upgrades.  This does not appear to be a
>> >> regression, just a general bug report.
>> >
>> > Philip, could you please look into this?
>>
>> (emacs) Package Installation says:
>>
>>    If you customize ‘package-install-upgrade-built-in’ to a non-‘nil’
>> value, be very careful when using commands that update many packages at
>> once, like ‘package-upgrade-all’ and ‘U’ in the package menu: those
>> might overwrite built-in packages that you didn't intent to replace with
>> newer versions from the archives.  Don't use these bulk commands if you
>> want to update only a small number of built-in packages.
>>
>> I read this as that OPs behaviour what the option intends to do.
>>
>