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#62720: 29.0.60; Not easy at all to upgrade :core packages like Eglot Date: Tue, 25 Apr 2023 12:24:45 +0000 Message-ID: <87cz3sb14i.fsf@posteo.net> References: <87a5zj2vfo.fsf@gmail.com> <875ya1tdwf.fsf@posteo.net> <83edop6sdy.fsf@gnu.org> <831qkp6o0i.fsf@gnu.org> <83wn2h5825.fsf@gnu.org> <87wn2gkhzr.fsf@posteo.net> <83cz485oxi.fsf@gnu.org> <87leiwdyff.fsf@posteo.net> <834jpk5hih.fsf@gnu.org> <871qkom3fj.fsf@posteo.net> <83mt3b4yfc.fsf@gnu.org> <87edonlsxi.fsf@posteo.net> <83jzyf4vzb.fsf@gnu.org> <871qknllkj.fsf@posteo.net> <83fs934pjf.fsf@gnu.org> <87wn2fk47y.fsf@posteo.net> <87354q92gh.fsf@posteo.net> <952d1e4d-ef80-ae15-ae27-508ec3d68559@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="800"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62720@debbugs.gnu.org, Eli Zaretskii , larsi@gnus.org, monnier@iro.umontreal.ca, joaotavora@gmail.com To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 25 14:25:18 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 1prHjS-000AcU-3B for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Apr 2023 14:25:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prHjE-00018X-J5; Tue, 25 Apr 2023 08:25: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 1prHjD-00018H-8c for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 08:25:03 -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 1prHjB-0004ht-Ps for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 08:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prHjB-0005Jo-M1 for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 08:25: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: Tue, 25 Apr 2023 12:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62720 X-GNU-PR-Package: emacs Original-Received: via spool by 62720-submit@debbugs.gnu.org id=B62720.168242546420391 (code B ref 62720); Tue, 25 Apr 2023 12:25:01 +0000 Original-Received: (at 62720) by debbugs.gnu.org; 25 Apr 2023 12:24:24 +0000 Original-Received: from localhost ([127.0.0.1]:51584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prHiZ-0005Ip-Uj for submit@debbugs.gnu.org; Tue, 25 Apr 2023 08:24:24 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:32837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prHiV-0005IY-UG for 62720@debbugs.gnu.org; Tue, 25 Apr 2023 08:24:23 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0D58A2404F7 for <62720@debbugs.gnu.org>; Tue, 25 Apr 2023 14:24:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682425454; bh=/GaPWyLm5mFZUO2Ydf9hujG2zK3fDNpITLN4l11OHGs=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=TTcy7xPFqC5YRPqVDO7yH474P3YjApNRxYe3BuxPOet1bn9r3D9KAYUyVlLLQaaOj LhE9CQFwGnMYuLsxxc2KixYcU10F5lm/D5yCy5r19OzJvHr5JGD+PCbHLQJcgDT+3m ayzUdaGi04E/xtv3C+gyZa3xtnk/ey9OkCTBFPJWa+ankcqT81tlQZtnsC/H4llBI/ ReWiuJq/sBwNYpxZzRzr+89G+ES4wDiZ1ehaRCYuMlICBeTj9JWAFcOvc65lgouS/o LcEKq/79ys+gZjdzlqMQOA72zqjE8X+2dcXwTyJXBf3BZr5lX5dhZLhwhek9eddqCn NTXRgmD9CirGg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q5Llc73g8z6tx7; Tue, 25 Apr 2023 14:24:12 +0200 (CEST) In-Reply-To: <952d1e4d-ef80-ae15-ae27-508ec3d68559@gutov.dev> (Dmitry Gutov's message of "Sun, 23 Apr 2023 23:56:23 +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:260613 Archived-At: Dmitry Gutov writes: > On 23/04/2023 16:02, Philip Kaludercic wrote: >> Dmitry Gutov writes: >> >>> Philip, >>> >>> On 13/04/2023 21:49, Philip Kaludercic wrote: >>>> + (when (and (or current-prefix-arg package-install-upgrade-built-in) >>>> + (package--active-built-in-p pkg)) >>>> + (setq pkg (cadr (assq name package-archive-contents)))) >>> >>> How sure are you that the first element in (cdr (assq name >>> package-archive-contents)) will contain the latest version? >> This is not certain, but the same approach is used in other places >> in >> package.el, so I just stocked to it. > > Perhaps they conceal latent bugs as well. I don't know the codebase > too well, but the places I did examine used the comparison together > with the priority. I will look into this. >>> That's why I came with the more complex way to choose the appropriate >>> package-desc in my latest attempt: >>> >>> (car >>> (last (seq-sort-by #'package-desc-priority-version >>> #'version-list-< >>> (cdr (assq package package-archive-contents))))) >> If we insist on package.el installing the newest version, then this >> would make sense. > > What's the alternative? Upgrading to "some version"? Respect `package-archive-priorities'. >> AFAIK there is no guarantees on the order of packages >> in `package-archive-contents'. This shouldn't be an issue for Eglot, >> but might be one for use-package. > > Ah, it seems they removed it from Melpa, that shouldn't surprise me. Oh, I did not know it was on MELPA in the first place. I haven't been using the archive for a while. > Eglot is in the GNU-devel archive as well, though. So there is some > potential for conflict. Hmm, I guess that is true, but I have never been a fan of advertising the -devel archives for day-to-day usage. >> I would actually pull it out into a >> separate utility function that we would re-use in other places. > > Since I had to drop the respective code from the latest version of the > patch, I guess you could put it in package-install instead. > > A reusable helper is fine, of course, but what are the other places we > would use it at? At any place where (cadr ...) is used, I would assume.