Subject: Re: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package

From: Daniel Mendler <[email-masked]>
Date: Tue, 10 Dec 2024 16:05:17 +0100

Philip Kaludercic <[email-masked]> writes:

> Eli Zaretskii <[email-masked]> writes:
>
>>> Cc: [email-masked]
>>> From: Philip Kaludercic <[email-masked]>
>>> Date: Thu, 28 Nov 2024 11:34:51 +0000
>>> 
>>> Philip Kaludercic <[email-masked]> writes:
>>> 
>>> [...]
>>> 
>>> > It might make sense to try and "deactivate" a package before installing
>>> > the new package.  Looking into some second-try fallback for
>>> > package-install to refresh the package index if a package was not found
>>> > would also be a good idea ^^
>>> 
>>> This might do it?
>>
>> Philip, please install this on the emacs-30 branch, unless you see any
>> problems with the change.  We'd like to make another pretest soon.
>
> Done.  But we should keep the report open as there might be better
> approaches to discuss in the future.

Hello Philip,

I just tried the modified `package-upgrade' function and it doesn't seem
to work. It seems to break the upgrade procedure in an even worse way,
at least in my setup. Now `package-install' is tried first with the
package symbol, which will be a no-op, since the package is already
installed. Afterwards the package is deleted and we always end up with
no package. Probably `package-install' should also be called with a
package descriptor of the new package version?

Thanks!

Daniel