From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#63587: 29.0.91; package-menu-mark-upgrades does not show available upgrades Date: Sat, 27 May 2023 08:04:23 +0000 Message-ID: <871qj2urnc.fsf@posteo.net> References: <83sfbqqfit.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20290"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63587@debbugs.gnu.org, Andreas Kurth To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 27 10:05:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2ovT-00055R-O1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 May 2023 10:05:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2ovA-0005iQ-Uk; Sat, 27 May 2023 04:05:04 -0400 Original-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 ) id 1q2ov8-0005iG-O1 for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 04:05:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2ov8-0000zK-FO for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 04:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2ov7-0005t2-T7 for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 04:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 May 2023 08:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63587 X-GNU-PR-Package: emacs Original-Received: via spool by 63587-submit@debbugs.gnu.org id=B63587.168517467822582 (code B ref 63587); Sat, 27 May 2023 08:05:01 +0000 Original-Received: (at 63587) by debbugs.gnu.org; 27 May 2023 08:04:38 +0000 Original-Received: from localhost ([127.0.0.1]:51339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2ouj-0005sA-Hv for submit@debbugs.gnu.org; Sat, 27 May 2023 04:04:37 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:59361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2ouh-0005rv-Vw for 63587@debbugs.gnu.org; Sat, 27 May 2023 04:04:36 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0ECEA240028 for <63587@debbugs.gnu.org>; Sat, 27 May 2023 10:04:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1685174670; bh=WumgRx7s9LCVw1uLBbDmoVP2V9shIm1A+JN3S7pnYH4=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=jk5V29v2rC+OabQqXt80PxHWaPPKFhSyA41T2Rjjzmnu0AA+/wm/L68baONm95XHb gYyJiACJzwIvZok3lSXUF7WnS9bQ0T64EHMIfPe7BWcIkixazD+r2nB//0IIok7thJ rT80jXCrTxbN32UHpQLqP6FyOJrma7PRMzWKBn5/Iw9dd/dX2NB0N0vfhyc+WdmJyK o8xJnDlTZvi/9dw6vBnlDtiXPIb8KgkvYvcyXWyxpy3BafD7z4lJPUeMjFYAKPGFnh gdGx7ZEWedl+aw6d5Zbf/t+nI5M9ggvjY3s8Ydz4vmFOkWoCSiirkkXAqoyx3MzH2w NcAJA/nJtDAzQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QSvT91hTBz9rxH; Sat, 27 May 2023 10:04:29 +0200 (CEST) In-Reply-To: <83sfbqqfit.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 May 2023 11:01:46 +0300") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262468 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> Date: Fri, 19 May 2023 08:30:46 +0200 >> From: Andreas Kurth >>=20 >> after setting package-install-upgrade-built-in to a non-nil value, the >> command "M-x package-menu-mark-upgrades" won=E2=80=99t show upgradeable = non >> built-in packages (magit, embark, ...) any more. Same for pressing "U" >> in the package menu. Also, the command "M-x list-packages" won=E2=80=99t >> announce upgradeable packages in the echo area. >>=20 >> Setting package-install-upgrade-built-in to nil will revert that >> faulty behaviour. >>=20 >> I bisected the error to commit >> ba2c76fa2bc3aabfda7d1d09cc5148f3f9d8e08e in emacs-29 branch. > > Philip, could you please look into this issue? I've taken a look at the issue, and think this small change should fix the issue: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 325c7b4e0a6..01826da273d 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3751,8 +3751,8 @@ package-menu--find-upgrades (and avail-pkg (version-list-< (package-desc-priority-version pkg-desc) (package-desc-priority-version avail-pkg)) - (xor (not package-install-upgrade-built-in) - (package--active-built-in-p pkg-desc)) + (or (not (package--active-built-in-p pkg-desc)) + package-install-upgrade-built-in) (push (cons name avail-pkg) upgrades)))) upgrades)) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable And before I just propose a different change, I'd like to try and prove that it fixes the above issue. For a package with an update, let p :=3D is a built-in package q :=3D built-in packages should be upgradede The previous implementation with xor (p =E2=8A=BB q) correctly decides to upgrade or not-upgrade the package in three of the four possible cases p q upgrade?=20 -------------- t f f t t t f t f <-- this was Andreas case f f t But since non-built-in packages should always be upgraded, we need to change the condition to only be false when we have a built-in package but `package-install-upgrade-built-in' is non-nil: =C2=AC (=C2=AC q =E2=88=A7 p) =3D =C2=AC=C2=AC q =E2=88=A8 =C2=ACp =3D q =E2=88=A8 =C2=ACp as we see, this should solve the issue: p q upgrade? (p =E2=88=A8 =C2=ACq) -------------- t f f t t t f t t f f t Does this look OK? --=-=-=--