GNU logs - #74556, boring messages


Message sent to philipk@HIDDEN, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Daniel Mendler <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: philipk@HIDDEN, bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 27 Nov 2024 11:38:02 +0000
Resent-Message-ID: <handler.74556.B.17327074673676 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 74556 <at> debbugs.gnu.org
Cc: Philip Kaludercic <philipk@HIDDEN>
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
X-Debbugs-Original-Xcc: Philip Kaludercic <philipk@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.17327074673676
          (code B ref -1); Wed, 27 Nov 2024 11:38:02 +0000
Received: (at submit) by debbugs.gnu.org; 27 Nov 2024 11:37:47 +0000
Received: from localhost ([127.0.0.1]:60792 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGGMd-0000xD-AI
	for submit <at> debbugs.gnu.org; Wed, 27 Nov 2024 06:37:47 -0500
Received: from lists.gnu.org ([209.51.188.17]:55034)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1tGGMb-0000x5-TU
 for submit <at> debbugs.gnu.org; Wed, 27 Nov 2024 06:37:46 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1tGGMX-0005LC-WF
 for bug-gnu-emacs@HIDDEN; Wed, 27 Nov 2024 06:37:42 -0500
Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1tGGMW-0001No-0y
 for bug-gnu-emacs@HIDDEN; Wed, 27 Nov 2024 06:37:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=daniel-mendler.de; s=key; h=Content-Transfer-Encoding:Content-Type:
 MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=/M9YoESi8b6+GH+qlaSkVv1Ydu40QUVTXJyDBD275NM=; b=uGsK54Mq5Y9hDVn3PyJWUmZ/eM
 xkMSV/KF7WjWFRn9Rl4HwYKrAqghCLUoMrXjF/37j7sED2t9I6DS5rSY2JC3Qr/xTF6Iv9pq96JE7
 Fy6WJYtlZsE596hhij4kbZz3UDMchULneF6lecxYXpxSl8QWxqZu9ZdX2lAGfAV5wRb0=;
From: Daniel Mendler <mail@HIDDEN>
Date: Wed, 27 Nov 2024 12:37:17 +0100
Message-ID: <87plmgq55e.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2a01:4f8:c012:9177::1;
 envelope-from=mail@HIDDEN; helo=mail.qxqx.de
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Package upgrade can fail when the package metadata is out of sync. The
upgrade process first deletes the package, tries to download the new
version. If the download fails for some reason (metadata out of sync or
the file not available), the upgrade aborts but the earlier package
deletion is not rolled back as one would expect for an upgrade
transaction. Ideally the download would be performed first such that the
upgrade process wouldn't lead to a missing package.

I just executed M-x package-upgrade-all. The following messages appeared
in the log:

Package =E2=80=98<package>-<old-version>=E2=80=99 deleted.
Contacting host: elpa.gnu.org:443
package--with-response-buffer-1:
https://elpa.gnu.org/devel/<pkgname>-<new-version>.tar: No Data




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Daniel Mendler <mail@HIDDEN>
Subject: bug#74556: Acknowledgement (30.0.92; Package upgrade can fail and
 results in deleted package)
Message-ID: <handler.74556.B.17327074673676.ack <at> debbugs.gnu.org>
References: <87plmgq55e.fsf@HIDDEN>
X-Gnu-PR-Message: ack 74556
X-Gnu-PR-Package: emacs
Reply-To: 74556 <at> debbugs.gnu.org
Date: Wed, 27 Nov 2024 11:38:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  Philip Kaludercic <philipk@HIDDEN>
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 74556 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
74556: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74556
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Philip Kaludercic <philipk@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 28 Nov 2024 11:12:02 +0000
Resent-Message-ID: <handler.74556.B74556.173279230510908 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Daniel Mendler <mail@HIDDEN>
Cc: 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.173279230510908
          (code B ref 74556); Thu, 28 Nov 2024 11:12:02 +0000
Received: (at 74556) by debbugs.gnu.org; 28 Nov 2024 11:11:45 +0000
Received: from localhost ([127.0.0.1]:36921 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGcQy-0002ps-Rg
	for submit <at> debbugs.gnu.org; Thu, 28 Nov 2024 06:11:45 -0500
Received: from mout02.posteo.de ([185.67.36.66]:55765)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1tGcQw-0002pT-7p
 for 74556 <at> debbugs.gnu.org; Thu, 28 Nov 2024 06:11:43 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id EBB90240101
 for <74556 <at> debbugs.gnu.org>; Thu, 28 Nov 2024 12:11:35 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1732792295; bh=dCLYOH1H43Z9ytRoMgMLaUjMCzQOJhSPXNC8pp4Wipc=;
 h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version:
 Content-Type:From;
 b=d6sQu6KjCbv3r92vu7126KCi77lY3EVnThEw5/9csiLJTete8UBzFZMdXRGZqm+u4
 DIa0QDX4OGR/CvlYF13h4ReO1QQF2kVzRX4OGf3M2p2vmQC9AFSxPqmmO4i/YbGVpQ
 7bLKzgk/4ci2zclhxeHQ0h+qa0e+EwZlCDXngPbzw790dxoEsUlPn4hK+1gOqbDSbO
 C6hSrW2K9Irn4n8MoPUTo0V3/R/1xIfQ7zW2uB90lNpe8FiETkBKIipImt4SfB6vr8
 ob6F52TX3lBaYCQVBjiQdjr7qrYCjpdDN5ki4Zd0EfgA/rCRpMpNOEINIJcOFFQZIS
 u0ZMMws2sCWmQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4XzYXl0T4jz9rxK;
 Thu, 28 Nov 2024 12:11:33 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
In-Reply-To: <87plmgq55e.fsf@HIDDEN> (Daniel Mendler's message of
 "Wed, 27 Nov 2024 12:37:17 +0100")
References: <87plmgq55e.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; keydata=
 mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI
 BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0
 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB
 BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE
 Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK
 NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof
 z4oM
OpenPGP: id=philipk@HIDDEN;
 url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN";
 preference=signencrypt
Date: Thu, 28 Nov 2024 11:11:33 +0000
Message-ID: <87zflj62ai.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Daniel Mendler <mail@HIDDEN> writes:

> Package upgrade can fail when the package metadata is out of sync. The
> upgrade process first deletes the package, tries to download the new
> version. If the download fails for some reason (metadata out of sync or
> the file not available), the upgrade aborts but the earlier package
> deletion is not rolled back as one would expect for an upgrade
> transaction. Ideally the download would be performed first such that the
> upgrade process wouldn't lead to a missing package.
>
> I just executed M-x package-upgrade-all. The following messages appeared
> in the log:
>
> Package =E2=80=98<package>-<old-version>=E2=80=99 deleted.
> Contacting host: elpa.gnu.org:443
> package--with-response-buffer-1:
> https://elpa.gnu.org/devel/<pkgname>-<new-version>.tar: No Data

I cannot test this out right now, but it seems that the fix should be
straight-forward


--=-=-=
Content-Type: text/plain
Content-Disposition: inline

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 438af781393..46b2d7580c1 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2268,12 +2268,16 @@ package-upgrade
     ;; `pkg-desc' will be nil when the package is an "active built-in".
     (if (and pkg-desc (package-vc-p pkg-desc))
         (package-vc-upgrade pkg-desc)
-      (when pkg-desc
-        (package-delete pkg-desc 'force 'dont-unselect))
       (package-install package
                        ;; An active built-in has never been "selected"
                        ;; before.  Mark it as installed explicitly.
-                       (and pkg-desc 'dont-select)))))
+                       (and pkg-desc 'dont-select))
+      ;; We delete the old package via the descriptor after installing
+      ;; the new package to avoid losing the package if there issues
+      ;; during installation (Bug#74556).
+      (cl-assert (package-desc-dir pkg-desc))
+      (when pkg-desc
+        (package-delete pkg-desc 'force 'dont-unselect)))))
 
 (defun package--upgradeable-packages (&optional include-builtins)
   ;; Initialize the package system to get the list of package

--=-=-=
Content-Type: text/plain


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 ^^

--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Philip Kaludercic <philipk@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 28 Nov 2024 11:36:01 +0000
Resent-Message-ID: <handler.74556.B74556.173279370815290 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Daniel Mendler <mail@HIDDEN>
Cc: 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.173279370815290
          (code B ref 74556); Thu, 28 Nov 2024 11:36:01 +0000
Received: (at 74556) by debbugs.gnu.org; 28 Nov 2024 11:35:08 +0000
Received: from localhost ([127.0.0.1]:37023 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGcnc-0003xp-8h
	for submit <at> debbugs.gnu.org; Thu, 28 Nov 2024 06:35:08 -0500
Received: from mout01.posteo.de ([185.67.36.65]:35159)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1tGcnZ-0003th-ED
 for 74556 <at> debbugs.gnu.org; Thu, 28 Nov 2024 06:35:06 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 38A76240027
 for <74556 <at> debbugs.gnu.org>; Thu, 28 Nov 2024 12:34:57 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1732793699; bh=jANIS1/Ibek+mGi11K5E2mMP8Yi5JufGdsr4Bctnrx0=;
 h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version:
 Content-Type:From;
 b=C/FeHqbdG+Ks+53dltvD0CfnpnQ2dlVfR6TLouwq7jWBPYxJQxLGgjqb9gM35Qxu+
 4Ip2eQK6//P/ntI5FiAR/ihTafc3HeU9WBlvHk6WtVEZNzp/WsM93PIjsuCiQc4oww
 WmkQy/lCdGNV2dAQmgU0aJjsBrszSq0q37jISC9pAw3nC+zkKz0eYtS39/enVkN905
 LGYmLCekyMoG+BmVZZVh6NzdldImDBJc0q500HRsEBUEAA8Yn3qwKQFOv1+5bTMWYZ
 CA5M9xfXQ8tdRFyxD+8CUmiN2Bz/cNgt4xS3t+8DQm87BkZvBEZKjM10nCDn+8d3Fm
 PJyB9vD02xo/g==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4XzZ3j1Nf0z9rxK;
 Thu, 28 Nov 2024 12:34:57 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
In-Reply-To: <87zflj62ai.fsf@HIDDEN> (Philip Kaludercic's message of "Thu, 
 28 Nov 2024 11:11:33 +0000")
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; keydata=
 mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI
 BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0
 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB
 BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE
 Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK
 NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof
 z4oM
OpenPGP: id=philipk@HIDDEN;
 url="https://keys.openpgp.org/vks/v1/by-email/philipk@HIDDEN";
 preference=signencrypt
Date: Thu, 28 Nov 2024 11:34:51 +0000
Message-ID: <87v7w7617o.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Philip Kaludercic <philipk@HIDDEN> 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?


--=-=-=
Content-Type: text/plain
Content-Disposition: inline

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 438af781393..3800d8fa56d 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2095,7 +2095,7 @@ package-archive-base
   "Return the package described by DESC."
   (cdr (assoc (package-desc-archive desc) package-archives)))
 
-(defun package-install-from-archive (pkg-desc)
+(defun package-install-from-archive-1 (pkg-desc)
   "Download and install a package defined by PKG-DESC."
   ;; This won't happen, unless the archive is doing something wrong.
   (when (eq (package-desc-kind pkg-desc) 'dir)
@@ -2141,6 +2141,15 @@ package-install-from-archive
                                                  package-alist))))
                  (setf (package-desc-signed (car pkg-descs)) t))))))))))
 
+(defun package-install-from-archive (pkg-desc)
+  "Download and install PKG-DESC, refreshing the archive if necessary."
+  (condition-case msg
+      (package-install-from-archive-1 pkg-desc)
+    (error
+     (when (string-match-p "\\`Error retrieving: " (cadr msg))
+       (package-refresh-contents)
+       (package-install-from-archive-1 pkg-desc)))))
+
 ;;;###autoload
 (defun package-installed-p (package &optional min-version)
   "Return non-nil if PACKAGE, of MIN-VERSION or newer, is installed.

--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 07 Dec 2024 12:30:02 +0000
Resent-Message-ID: <handler.74556.B74556.17335745758052 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Philip Kaludercic <philipk@HIDDEN>
Cc: mail@HIDDEN, 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.17335745758052
          (code B ref 74556); Sat, 07 Dec 2024 12:30:02 +0000
Received: (at 74556) by debbugs.gnu.org; 7 Dec 2024 12:29:35 +0000
Received: from localhost ([127.0.0.1]:45811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tJtwE-00025o-RQ
	for submit <at> debbugs.gnu.org; Sat, 07 Dec 2024 07:29:35 -0500
Received: from eggs.gnu.org ([209.51.188.92]:34334)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tJtwC-00025W-Se
 for 74556 <at> debbugs.gnu.org; Sat, 07 Dec 2024 07:29:33 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tJtw6-0002bG-Um; Sat, 07 Dec 2024 07:29:26 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=OPu7oeqTzPObLVy/SX804RL9wUfw5MfQEHApIoYUxns=; b=h7iKeTqo5z7I
 gYqsQJ6vCOr7G70Dqrwaxv2Koqxa3tBIIEZY/ahZPIrn+SKQD68WnQtZiElLfh9P4SUgSOjOHTftU
 yFcJGVQF7bEVeHUk+ZQdYqx8bZieHqHbYpz1HptJ+90GBhBcdOtPtxUk+wvxjRNDBnLH0M591WnWE
 uPPqiLNWdNCcuSdtVxGTCCDMBEWZ4a4AcEbfzBOXBqPpeeoE0TfpUX5KGQpWGzTMNyrCLpoxVUIJr
 o6P61adlYz8vus5fKnL3/9GDCkRj41+u/nXtCbbFavPOtaujnjji/kBcNvXEtTPzBKdRk1yUz4VC6
 ZmQBlI6G6K2qbwMnFylZsg==;
Date: Sat, 07 Dec 2024 14:29:23 +0200
Message-Id: <86ttbfism4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87v7w7617o.fsf@HIDDEN> (message from Philip Kaludercic on
 Thu, 28 Nov 2024 11:34:51 +0000)
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
 <87v7w7617o.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 74556 <at> debbugs.gnu.org
> From: Philip Kaludercic <philipk@HIDDEN>
> Date: Thu, 28 Nov 2024 11:34:51 +0000
> 
> Philip Kaludercic <philipk@HIDDEN> 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Philip Kaludercic <philipk@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 07 Dec 2024 20:50:02 +0000
Resent-Message-ID: <handler.74556.B74556.17336045449054 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: mail@HIDDEN, 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.17336045449054
          (code B ref 74556); Sat, 07 Dec 2024 20:50:02 +0000
Received: (at 74556) by debbugs.gnu.org; 7 Dec 2024 20:49:04 +0000
Received: from localhost ([127.0.0.1]:48693 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tK1jc-0002Ly-72
	for submit <at> debbugs.gnu.org; Sat, 07 Dec 2024 15:49:04 -0500
Received: from mout02.posteo.de ([185.67.36.66]:34301)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1tK1jZ-0002LK-Pm
 for 74556 <at> debbugs.gnu.org; Sat, 07 Dec 2024 15:49:03 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 2E931240101
 for <74556 <at> debbugs.gnu.org>; Sat,  7 Dec 2024 21:48:54 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1733604535; bh=YGwkm9KY5AS4jawXLDtnDKDs7lxGGUA1V9nXrOAbfrQ=;
 h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version:
 Content-Type:From;
 b=oz10Z+Qqd9NWWA2rn6UIFfrPyyLcuQg6rNx+C28Khq6eCZZCv7xG06Kgj7l27fIqE
 GmqrYF3SvUkZHF1q9/Egfi/0p+WwigThgkhMhqfn1qiLBuqgGLfYQCUILFKZ9B4ldi
 hVJyo2YN6qkoTHKymBhn1yjYdnAm0W4lCQhk5eQTYNjVZndEhwwI7/m2pvdqQzWBmb
 ZZdhWHtc+a8xhwXJk31nWffbfUXF35VOplox/WFzZAm9hl6tqN0BlOU7VZHfJvHVp9
 CRPIymMivu+xeZxYXmUu4Nc99DTxMbtdffkoXNhS27bzxRhfmrVjhm8yJfUyn5A7TI
 Xez27ItqiHGHQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Y5Kwk2PHRz6twC;
 Sat,  7 Dec 2024 21:48:53 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
In-Reply-To: <86ttbfism4.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 07 Dec
 2024 14:29:23 +0200")
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
 <87v7w7617o.fsf@HIDDEN> <86ttbfism4.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; keydata=
 mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI
 BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0
 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB
 BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE
 Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK
 NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof
 z4oM
OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66;
 url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66";
 preference=signencrypt
Date: Sat, 07 Dec 2024 20:48:53 +0000
Message-ID: <87v7vvz0ay.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Cc: 74556 <at> debbugs.gnu.org
>> From: Philip Kaludercic <philipk@HIDDEN>
>> Date: Thu, 28 Nov 2024 11:34:51 +0000
>> 
>> Philip Kaludercic <philipk@HIDDEN> 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Daniel Mendler <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 10 Dec 2024 15:08:02 +0000
Resent-Message-ID: <handler.74556.B74556.173384325919624 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Philip Kaludercic <philipk@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.173384325919624
          (code B ref 74556); Tue, 10 Dec 2024 15:08:02 +0000
Received: (at 74556) by debbugs.gnu.org; 10 Dec 2024 15:07:39 +0000
Received: from localhost ([127.0.0.1]:59093 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tL1pq-00056R-Fe
	for submit <at> debbugs.gnu.org; Tue, 10 Dec 2024 10:07:38 -0500
Received: from server.qxqx.de ([49.12.34.165]:54937 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1tL1pn-00055w-B3
 for 74556 <at> debbugs.gnu.org; Tue, 10 Dec 2024 10:07:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date:
 References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:
 Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
 Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
 List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=oPYvXfbbn6eBE2Tr4MSjR5F4VVRhNWLVEI+i9227Y+g=; b=PU61yV+LuxLHGVK4Lyc7yu7Get
 V/JY4pLOCvque0fvZSTFmW0C6f6oDdORilbtLjXXuXjfEs89mj88y2n9ib7mzOMCHp8QeRPaJjp18
 vjCGSrVDpUE167Z07ixlB6A/4roeGAB6VVix9QbEFvhYQA29ibKvFRle0hQ8XWDw9NP0=;
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <87v7vvz0ay.fsf@HIDDEN> (Philip Kaludercic's message of "Sat, 
 07 Dec 2024 20:48:53 +0000")
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
 <87v7w7617o.fsf@HIDDEN> <86ttbfism4.fsf@HIDDEN>
 <87v7vvz0ay.fsf@HIDDEN>
Date: Tue, 10 Dec 2024 16:05:17 +0100
Message-ID: <87zfl3h93m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Philip Kaludercic <philipk@HIDDEN> writes:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
>>> Cc: 74556 <at> debbugs.gnu.org
>>> From: Philip Kaludercic <philipk@HIDDEN>
>>> Date: Thu, 28 Nov 2024 11:34:51 +0000
>>> 
>>> Philip Kaludercic <philipk@HIDDEN> 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




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Philip Kaludercic <philipk@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 10 Dec 2024 20:13:01 +0000
Resent-Message-ID: <handler.74556.B74556.173386154920261 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Daniel Mendler <mail@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.173386154920261
          (code B ref 74556); Tue, 10 Dec 2024 20:13:01 +0000
Received: (at 74556) by debbugs.gnu.org; 10 Dec 2024 20:12:29 +0000
Received: from localhost ([127.0.0.1]:59736 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tL6aq-0005Gg-SM
	for submit <at> debbugs.gnu.org; Tue, 10 Dec 2024 15:12:29 -0500
Received: from mout01.posteo.de ([185.67.36.65]:59359)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1tL6am-0005GC-RU
 for 74556 <at> debbugs.gnu.org; Tue, 10 Dec 2024 15:12:27 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 96C8E240029
 for <74556 <at> debbugs.gnu.org>; Tue, 10 Dec 2024 21:12:17 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1733861538; bh=tzwvEb36frL4dolbIle1oQYV+MsAYrRDQaoC5ipskjE=;
 h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version:
 Content-Type:From;
 b=RGQrM5GmrcVxUuiOEsDHDW+b9EcNrkvGR0NjWw17ClTl3ifZ00KWz9yHkjtDBncDB
 zJHbOJSDN3lE1SvBRpqfVrVOTl5iaEkmYRWYyeOa5yyCp92UPyNWWUaToryHWa+pEa
 HoChHm9KTKMwOJqb3rQhjZB0+mr9LRH25R8yPfU1JGn6CrkUGRvdsQZdmcFNc18f6z
 c9oJMeHsB/9FiJYodSncJCO5QNcXMVOUnk1bdNxvVlWwiD6rwXls0Fzhb+r9XQPYn0
 Ng3qY/VVZ85oNNwTg2fAjsaCHF2K5ZqLIsWXN6Ss6btTiikmzHY0kW7PspKhybPjzs
 tFEx1+N9Z3Q+Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Y78z41h6zz6tvk;
 Tue, 10 Dec 2024 21:12:15 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
In-Reply-To: <87zfl3h93m.fsf@HIDDEN> (Daniel Mendler's message of
 "Tue, 10 Dec 2024 16:05:17 +0100")
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
 <87v7w7617o.fsf@HIDDEN> <86ttbfism4.fsf@HIDDEN>
 <87v7vvz0ay.fsf@HIDDEN> <87zfl3h93m.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; keydata=
 mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI
 BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0
 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB
 BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE
 Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK
 NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof
 z4oM
OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66;
 url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66";
 preference=signencrypt
Date: Tue, 10 Dec 2024 20:12:15 +0000
Message-ID: <87ldwnxppc.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Daniel Mendler <mail@HIDDEN> writes:

> Philip Kaludercic <philipk@HIDDEN> writes:
>
>> Eli Zaretskii <eliz@HIDDEN> writes:
>>
>>>> Cc: 74556 <at> debbugs.gnu.org
>>>> From: Philip Kaludercic <philipk@HIDDEN>
>>>> Date: Thu, 28 Nov 2024 11:34:51 +0000
>>>> 
>>>> Philip Kaludercic <philipk@HIDDEN> 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?

Right, my sincere apologies for that oversight.  That being said, I
don't feel comfortable fixing this right now as I am short on time to
fix and test something like this on the "emacs-30" branch.  My vote
would be to revert the commit and try to tackle the issue on the
"master" branch.  An alternative I can propose that would be closer to
the original code might be


--=-=-=
Content-Type: text/plain
Content-Disposition: inline

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index fad0762e126..93b647edcea 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2268,16 +2285,14 @@ package-upgrade
     ;; `pkg-desc' will be nil when the package is an "active built-in".
     (if (and pkg-desc (package-vc-p pkg-desc))
         (package-vc-upgrade pkg-desc)
-      (package-install package
-                       ;; An active built-in has never been "selected"
-                       ;; before.  Mark it as installed explicitly.
-                       (and pkg-desc 'dont-select))
-      ;; We delete the old package via the descriptor after installing
-      ;; the new package to avoid losing the package if there issues
-      ;; during installation (Bug#74556).
-      (when pkg-desc
-        (cl-assert (package-desc-dir pkg-desc))
-        (package-delete pkg-desc 'force 'dont-unselect)))))
+      (unwind-protect
+          (when pkg-desc
+            (cl-assert (package-desc-dir pkg-desc))
+            (package-delete pkg-desc 'force 'dont-unselect))
+        (package-install package
+                         ;; An active built-in has never been "selected"
+                         ;; before.  Mark it as installed explicitly.
+                         (and pkg-desc 'dont-select))))))
 
 (defun package--upgradeable-packages (&optional include-builtins)
   ;; Initialize the package system to get the list of package

--=-=-=
Content-Type: text/plain


> Thanks!
>
> Daniel

--=-=-=--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Daniel Mendler <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 10 Dec 2024 20:25:01 +0000
Resent-Message-ID: <handler.74556.B74556.173386228824371 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Philip Kaludercic <philipk@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.173386228824371
          (code B ref 74556); Tue, 10 Dec 2024 20:25:01 +0000
Received: (at 74556) by debbugs.gnu.org; 10 Dec 2024 20:24:48 +0000
Received: from localhost ([127.0.0.1]:59748 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tL6ml-0006Kr-FJ
	for submit <at> debbugs.gnu.org; Tue, 10 Dec 2024 15:24:48 -0500
Received: from server.qxqx.de ([49.12.34.165]:35951 helo=mail.qxqx.de)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1tL6mi-0006KM-NQ
 for 74556 <at> debbugs.gnu.org; Tue, 10 Dec 2024 15:24:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date:
 References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:
 Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
 Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:
 List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=bJR0CSk7UOIrFbtRQ/Dg8xUN2IZKMp0lkA54B99VTe8=; b=Jn8JoJUZjoXah4CzX3u+xUQtOL
 pw06N5wNXF2ynILYNmDRGz6y6zh3lD9ysjeUCQaH9WezIjVSc2jQ+/3/y/VhM92joYX+xbPG49UYC
 BhmyDK4QNKG0WE6o1Cs+VyfSRjwjrC/IPN9bcJ6HrbXUvRYVlUEa6yaxDdNDq5i0zwwo=;
From: Daniel Mendler <mail@HIDDEN>
In-Reply-To: <87ldwnxppc.fsf@HIDDEN> (Philip Kaludercic's message of "Tue, 
 10 Dec 2024 20:12:15 +0000")
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
 <87v7w7617o.fsf@HIDDEN> <86ttbfism4.fsf@HIDDEN>
 <87v7vvz0ay.fsf@HIDDEN> <87zfl3h93m.fsf@HIDDEN>
 <87ldwnxppc.fsf@HIDDEN>
Date: Tue, 10 Dec 2024 21:24:35 +0100
Message-ID: <87pllzp9q4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Philip Kaludercic <philipk@HIDDEN> writes:

> Daniel Mendler <mail@HIDDEN> writes:
>
>> Philip Kaludercic <philipk@HIDDEN> writes:
>>
>>> Eli Zaretskii <eliz@HIDDEN> writes:
>>>
>>>>> Cc: 74556 <at> debbugs.gnu.org
>>>>> From: Philip Kaludercic <philipk@HIDDEN>
>>>>> Date: Thu, 28 Nov 2024 11:34:51 +0000
>>>>> 
>>>>> Philip Kaludercic <philipk@HIDDEN> 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?
>
> Right, my sincere apologies for that oversight.  That being said, I
> don't feel comfortable fixing this right now as I am short on time to
> fix and test something like this on the "emacs-30" branch.  My vote
> would be to revert the commit and try to tackle the issue on the
> "master" branch.  An alternative I can propose that would be closer to
> the original code might be

Yes, I also vote to revert your commit on the emacs-30 release branch.
The issue isn't severe (and not a regression), so I'd say it is okay to
fix the issue on the master branch.

I don't understand how the code you proposed works. It seems that after
the deletion, if the installation fails, the package will stay deleted?
Anyway, no hurry from my side to get this fixed.

Thanks.

Daniel




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Philip Kaludercic <philipk@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 10 Dec 2024 20:33:02 +0000
Resent-Message-ID: <handler.74556.B74556.173386273126992 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Daniel Mendler <mail@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.173386273126992
          (code B ref 74556); Tue, 10 Dec 2024 20:33:02 +0000
Received: (at 74556) by debbugs.gnu.org; 10 Dec 2024 20:32:11 +0000
Received: from localhost ([127.0.0.1]:59762 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tL6tu-00071F-As
	for submit <at> debbugs.gnu.org; Tue, 10 Dec 2024 15:32:10 -0500
Received: from mout02.posteo.de ([185.67.36.66]:38721)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1tL6tr-000707-Ii
 for 74556 <at> debbugs.gnu.org; Tue, 10 Dec 2024 15:32:08 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 415CE240105
 for <74556 <at> debbugs.gnu.org>; Tue, 10 Dec 2024 21:32:00 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1733862720; bh=2gX2lbsypuTpB3ZInbzJuqp5ascZWIchYJcuuwCmM9E=;
 h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version:
 Content-Type:From;
 b=e8/s2b1h+ZmyyKc28n5aLqeqvLt8sbvReZsZqGODkvisUFDLrel2mhsCe2W0cchIu
 ++lLFOeIJSAPppWRDFXjeZp7uE0IGTTsttaD3DbcOO0k5o9t38A7o9Wsr9iACWDLLT
 uLt2p4FXHtkfHZIPwbR6kSa2eCBa+ishbZWFOMi5iG0RmzhkP9rg4LvG5TUuzwIOBT
 3ex6znJLWfS3VDjimjwg6uhkdxqp2dFRlbXjS22zvdPmmWCOL2mDlI2FC1TKREbCZ+
 1zX/vU16tWGVIS98Hm/D++xsOtFyywwJp4q984ERs6+gaGhCKF8xlM3Ms/vQW/fYuA
 aO8v8cKRkl3Ig==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Y79Pq4Gp9z9rxK;
 Tue, 10 Dec 2024 21:31:59 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
In-Reply-To: <87pllzp9q4.fsf@HIDDEN> (Daniel Mendler's message of
 "Tue, 10 Dec 2024 21:24:35 +0100")
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
 <87v7w7617o.fsf@HIDDEN> <86ttbfism4.fsf@HIDDEN>
 <87v7vvz0ay.fsf@HIDDEN> <87zfl3h93m.fsf@HIDDEN>
 <87ldwnxppc.fsf@HIDDEN> <87pllzp9q4.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; keydata=
 mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI
 BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0
 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB
 BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE
 Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK
 NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof
 z4oM
OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66;
 url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66";
 preference=signencrypt
Date: Tue, 10 Dec 2024 20:31:59 +0000
Message-ID: <87h67bxosg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Daniel Mendler <mail@HIDDEN> > Philip Kaludercic <philipk@HIDDEN> writes:
>
>> Daniel Mendler <mail@HIDDEN> writes:
>>
>>> Philip Kaludercic <philipk@HIDDEN> writes:
>>>
>>>> Eli Zaretskii <eliz@HIDDEN> writes:
>>>>
>>>>>> Cc: 74556 <at> debbugs.gnu.org
>>>>>> From: Philip Kaludercic <philipk@HIDDEN>
>>>>>> Date: Thu, 28 Nov 2024 11:34:51 +0000
>>>>>> 
>>>>>> Philip Kaludercic <philipk@HIDDEN> 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?
>>
>> Right, my sincere apologies for that oversight.  That being said, I
>> don't feel comfortable fixing this right now as I am short on time to
>> fix and test something like this on the "emacs-30" branch.  My vote
>> would be to revert the commit and try to tackle the issue on the
>> "master" branch.  An alternative I can propose that would be closer to
>> the original code might be
>
> Yes, I also vote to revert your commit on the emacs-30 release branch.
> The issue isn't severe (and not a regression), so I'd say it is okay to
> fix the issue on the master branch.

Eli, what do you say?

> I don't understand how the code you proposed works. It seems that after
> the deletion, if the installation fails, the package will stay deleted?
> Anyway, no hurry from my side to get this fixed.

Forget it, I didn't think it through.

> Thanks.
>
> Daniel




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 11 Dec 2024 03:33:01 +0000
Resent-Message-ID: <handler.74556.B74556.173388798021693 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Philip Kaludercic <philipk@HIDDEN>
Cc: mail@HIDDEN, 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.173388798021693
          (code B ref 74556); Wed, 11 Dec 2024 03:33:01 +0000
Received: (at 74556) by debbugs.gnu.org; 11 Dec 2024 03:33:00 +0000
Received: from localhost ([127.0.0.1]:60638 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tLDT4-0005di-RR
	for submit <at> debbugs.gnu.org; Tue, 10 Dec 2024 22:33:00 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47036)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tLDSz-0005dK-Gw
 for 74556 <at> debbugs.gnu.org; Tue, 10 Dec 2024 22:32:53 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tLDQl-0002Ub-Kb; Tue, 10 Dec 2024 22:30:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Rqjj+HqfFqRyeoMRps7idsNVzpsz7wDNqefStnshrew=; b=YQtdxzwsv+cy
 uPQ26WPEDlBe/z8iUVZRuFtkKE4cf+Onge4EPihGSzU2F4n82kOHiRr+OV+3MWr2hMyaGI9DPXF6m
 53WU6mQ8s4BtEIc5cigSj7dg37faXU4gztNkQFdMDFVF0vov5KUxV1uVpLTBX6LswRMGQypS0Hyvn
 k8hPuzdWORIgEz3JrA/r35JSYbUHNYrZsYooCF//wXBoi9Px0Xt+RCaYdMl6cxvK8aTdX6/0iWRbI
 qUSHFi/L7gHEWwlv75rzQuIvCoxp4KY6VaKVW80jk2ckTUXfST2VHp1NAJ44uib5BDC2LRgtKZ6/1
 AdlvqgPku3T+Q9yZNr6hfA==;
Date: Wed, 11 Dec 2024 05:30:10 +0200
Message-Id: <86o71i522l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87h67bxosg.fsf@HIDDEN> (message from Philip Kaludercic on
 Tue, 10 Dec 2024 20:31:59 +0000)
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
 <87v7w7617o.fsf@HIDDEN> <86ttbfism4.fsf@HIDDEN>
 <87v7vvz0ay.fsf@HIDDEN> <87zfl3h93m.fsf@HIDDEN>
 <87ldwnxppc.fsf@HIDDEN> <87pllzp9q4.fsf@HIDDEN> 
 <87h67bxosg.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Philip Kaludercic <philipk@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  74556 <at> debbugs.gnu.org
> Date: Tue, 10 Dec 2024 20:31:59 +0000
> 
> Daniel Mendler <mail@HIDDEN> > Philip Kaludercic <philipk@HIDDEN> writes:
> >
> >> Daniel Mendler <mail@HIDDEN> writes:
> >>
> >>> Philip Kaludercic <philipk@HIDDEN> writes:
> >>>
> >>>> Eli Zaretskii <eliz@HIDDEN> writes:
> >>>>
> >>>>>> Cc: 74556 <at> debbugs.gnu.org
> >>>>>> From: Philip Kaludercic <philipk@HIDDEN>
> >>>>>> Date: Thu, 28 Nov 2024 11:34:51 +0000
> >>>>>> 
> >>>>>> Philip Kaludercic <philipk@HIDDEN> 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?
> >>
> >> Right, my sincere apologies for that oversight.  That being said, I
> >> don't feel comfortable fixing this right now as I am short on time to
> >> fix and test something like this on the "emacs-30" branch.  My vote
> >> would be to revert the commit and try to tackle the issue on the
> >> "master" branch.  An alternative I can propose that would be closer to
> >> the original code might be
> >
> > Yes, I also vote to revert your commit on the emacs-30 release branch.
> > The issue isn't severe (and not a regression), so I'd say it is okay to
> > fix the issue on the master branch.
> 
> Eli, what do you say?

It looks like you are in agreement, so please revert on emacs-30.
(Unless you also want to revert on master, don't forget to say "do not
merge" in the log message.)

Thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#74556: 30.0.92; Package upgrade can fail and results in deleted package
Resent-From: Philip Kaludercic <philipk@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 11 Dec 2024 03:35:02 +0000
Resent-Message-ID: <handler.74556.B74556.173388809721974 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 74556
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: mail@HIDDEN, 74556 <at> debbugs.gnu.org
Received: via spool by 74556-submit <at> debbugs.gnu.org id=B74556.173388809721974
          (code B ref 74556); Wed, 11 Dec 2024 03:35:02 +0000
Received: (at 74556) by debbugs.gnu.org; 11 Dec 2024 03:34:57 +0000
Received: from localhost ([127.0.0.1]:60643 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tLDV2-0005iL-GI
	for submit <at> debbugs.gnu.org; Tue, 10 Dec 2024 22:34:56 -0500
Received: from mout02.posteo.de ([185.67.36.66]:53375)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1tLDUz-0005hs-93
 for 74556 <at> debbugs.gnu.org; Tue, 10 Dec 2024 22:34:54 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 23233240101
 for <74556 <at> debbugs.gnu.org>; Wed, 11 Dec 2024 04:34:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1733888087; bh=GDGUc7Aq34AWJAsmo4OMi+wBjvKn+dowbriq5095D3w=;
 h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version:
 Content-Type:From;
 b=CpPdecLv8722/24Va89Zf4bw9I1yeQxSq7bV9grvjnr+z76S5IsxPFCtjEfFAtHdu
 +BNrB+5rNWfr8SV+zWbQ5Gs30XKogrmAXIZApT6g/ZpYUy0BmusHnifwGTaA7qpAPl
 FhEnJMfCiSWhWMIUML3p8AG5JM2PKUZqN5Z9rV7U5+So2Pqzwwr4uLcNTkitL9khw1
 t5e4KbJP5LAp+jcNE3lhKPsKj5qCDFk7HYoJrlIFlXx7+Iz8uS4MjmegNRcsbZlrgO
 nOOCVKvAmv9mA0P1G3qHH1rrdcWhVU2qQBvOAnUDdTA6usD38V9iZG5FIxErySaHnQ
 D+MtHQs19RnkQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Y7Lnd2dCZz9rxD;
 Wed, 11 Dec 2024 04:34:44 +0100 (CET)
From: Philip Kaludercic <philipk@HIDDEN>
In-Reply-To: <86o71i522l.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 11 Dec
 2024 05:30:10 +0200")
References: <87plmgq55e.fsf@HIDDEN> <87zflj62ai.fsf@HIDDEN>
 <87v7w7617o.fsf@HIDDEN> <86ttbfism4.fsf@HIDDEN>
 <87v7vvz0ay.fsf@HIDDEN> <87zfl3h93m.fsf@HIDDEN>
 <87ldwnxppc.fsf@HIDDEN> <87pllzp9q4.fsf@HIDDEN>
 <87h67bxosg.fsf@HIDDEN> <86o71i522l.fsf@HIDDEN>
Autocrypt: addr=philipk@HIDDEN; keydata=
 mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo
 aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0
 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI
 BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0
 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB
 BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE
 Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK
 NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof
 z4oM
OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66;
 url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66";
 preference=signencrypt
Date: Wed, 11 Dec 2024 03:34:44 +0000
Message-ID: <875xnqyjsb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Philip Kaludercic <philipk@HIDDEN>
>> Cc: Eli Zaretskii <eliz@HIDDEN>,  74556 <at> debbugs.gnu.org
>> Date: Tue, 10 Dec 2024 20:31:59 +0000
>> 
>> Daniel Mendler <mail@HIDDEN> > Philip Kaludercic <philipk@HIDDEN> writes:
>> >
>> >> Daniel Mendler <mail@HIDDEN> writes:
>> >>
>> >>> Philip Kaludercic <philipk@HIDDEN> writes:
>> >>>
>> >>>> Eli Zaretskii <eliz@HIDDEN> writes:
>> >>>>
>> >>>>>> Cc: 74556 <at> debbugs.gnu.org
>> >>>>>> From: Philip Kaludercic <philipk@HIDDEN>
>> >>>>>> Date: Thu, 28 Nov 2024 11:34:51 +0000
>> >>>>>> 
>> >>>>>> Philip Kaludercic <philipk@HIDDEN> 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?
>> >>
>> >> Right, my sincere apologies for that oversight.  That being said, I
>> >> don't feel comfortable fixing this right now as I am short on time to
>> >> fix and test something like this on the "emacs-30" branch.  My vote
>> >> would be to revert the commit and try to tackle the issue on the
>> >> "master" branch.  An alternative I can propose that would be closer to
>> >> the original code might be
>> >
>> > Yes, I also vote to revert your commit on the emacs-30 release branch.
>> > The issue isn't severe (and not a regression), so I'd say it is okay to
>> > fix the issue on the master branch.
>> 
>> Eli, what do you say?
>
> It looks like you are in agreement, so please revert on emacs-30.

Done

> (Unless you also want to revert on master, don't forget to say "do not
> merge" in the log message.)

No, it doesn't make sense to keep the current change on master either.

> Thanks.





Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.