From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Kurth Newsgroups: gmane.emacs.bugs Subject: bug#63587: 29.0.91; package-menu-mark-upgrades does not show available upgrades Date: Sat, 27 May 2023 18:31:50 +0200 Message-ID: References: <83sfbqqfit.fsf@gnu.org> <871qj2urnc.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14342"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 63587@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 27 18:33: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 1q2wr5-0003az-Oy for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 May 2023 18:33:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2wql-0006Hi-No; Sat, 27 May 2023 12:33:03 -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 1q2wqj-0006GS-VJ for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 12:33:01 -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 1q2wqj-0007Ji-NU for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 12:33:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2wqj-0001mT-J1 for bug-gnu-emacs@gnu.org; Sat, 27 May 2023 12:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Kurth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 May 2023 16:33: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.16852051216744 (code B ref 63587); Sat, 27 May 2023 16:33:01 +0000 Original-Received: (at 63587) by debbugs.gnu.org; 27 May 2023 16:32:01 +0000 Original-Received: from localhost ([127.0.0.1]:52463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2wpk-0001kd-S0 for submit@debbugs.gnu.org; Sat, 27 May 2023 12:32:01 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:33269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2wpi-0001kO-TG for 63587@debbugs.gnu.org; Sat, 27 May 2023 12:31:59 -0400 Original-Received: from united.domain ([109.250.24.134]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MgNlB-1qauKl0tiR-00hyNb; Sat, 27 May 2023 18:31:52 +0200 Content-Disposition: inline In-Reply-To: <871qj2urnc.fsf@posteo.net> OpenPGP: id=42E6E88E86E24E19; url=https://akurth.de/gpg/ak/pubkey.asc X-Provags-ID: V03:K1:Tel/B0jK9XmRCCYswO+nmyV5yp2ZI8xF1et2IrkGddez+h5z/+v SC2lBJpNfKiRHsjIQrJw6XnD/AP5T0KIeVZx4GcupHiCdm3pMXRjdSdKqbBbFePh6b5xF8m sOMmDr3zrb6XMhIDI3YYYcofydsCAgQTz+uqJhJLUSPiZJQ9HKid9WWMUQRfUQlIvTwOnrL esf4kShLEsbJV3E9YpT7w== UI-OutboundReport: notjunk:1;M01:P0:MPmJzid0TEs=;awCqpUq7tHllOSw4D+HMZwbXxF5 dN11c9CR1c309xXrprEFugZ7I2fOH5yuzCSl55dEENhAwKzF48Mt1CDSeAQUxDvZUb62lDaSh vPN50wEmnQb0pi7n4RxK8LV8HrptaVBCyu9hKmq0Atq1iCeSVMMuf7OCdHrhkMpDhCDAdxha6 kozMAZLJYC5ZBFsa25RIOsTLYEeZSYqJfwywTPMPlmCEIpjYVF5wAhqPuwspNw4RGSerAdBwc rj/Ek85OQ0eDrXtQO/WAyOhIod33nChWx4AqbrXANMJvTV/4pdEdS2wcRY4MZk8oX/NbIfwYZ flVY2A5PNiycNM+rY3XVFQHASsr9BqYiqbGCuKzj33xAUWma5sShaJwSyN+VnjgeUCR2V8cgE 5zBGZD3VDQXGf0zaxKzLYEdlxgb5WV7189CtoBl30SgabjnpC86R4RAPwnuYKEp0nlVW7u9ZZ 3B/oDE1Wrv7FTeDc9S2cNNG7se9oLmXXFc825tc2eGchkT7W/n8N97U9gNKT+MBNCRSBwpnAk xor3igqt2LTQpYKG3vpXQiGTDuVoMXWQB/JdFLAEhZWaIsV67AuJxf3y7uQGLiUwkaAQB5+6p lZr5f2oMMBN/3dG5+T/D7GY1zguTGSeKUTz9IRxrvQCKoQei35qfjNVebm38r2sZO3eIFBA1+ XLfhFm2sj01OlPQO8idJLOBVYDE4hB2nbgbkodOilg== 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:262480 Archived-At: Philip wrote: > I've taken a look at the issue, and think this small change should fix > the issue: >=20 > 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)) >=20 >=20 > 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 >=20 > p :=3D is a built-in package > q :=3D built-in packages should be upgradede >=20 > 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 >=20 > p q upgrade?=20 > -------------- > t f f > t t t > f t f <-- this was Andreas case > f f t >=20 > 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: >=20 > =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 >=20 > as we see, this should solve the issue: >=20 > p q upgrade? (p =E2=88=A8 =C2=ACq) > -------------- > t f f > t t t > f t t > f f t >=20 > Does this look OK? This sounds reasonable and looks like the natural implementation to me (I=E2=80=99m not a proficient elisp developer though). I applied the patch and already got an update for a non-built-in package. Thanks, Andreas.