From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62720: 29.0.60; Not easy at all to upgrade :core packages like Eglot Date: Sat, 22 Apr 2023 15:00:29 +0300 Message-ID: <83edoc1602.fsf@gnu.org> References: <87a5zj2vfo.fsf@gmail.com> <87a5z3izst.fsf@web.de> <83v8hr7qk9.fsf@gnu.org> <83pm7z7nkc.fsf@gnu.org> <4b63ef62-5e1c-3dcf-ec7b-06b69e79133b@gutov.dev> <83o7nj7mfn.fsf@gnu.org> <556e0fbb-215e-c11d-0e8b-73e97441abbb@gutov.dev> <83pm7y6fdo.fsf@gnu.org> <47140c27-ba63-ca7b-8b9e-cc38a6f9a866@gutov.dev> <838rem636a.fsf@gnu.org> <83leil4u63.fsf@gnu.org> <8a9d0e2b-6ae2-bcdc-efd0-52a44ac862bb@gutov.dev> <83h6t94hru.fsf@gnu.org> <7676c8d2-1324-31e7-38b3-de167ecf683a@gutov.dev> <8e9bd99a-3093-3b69-8429-aa1ae6b7240d@gutov.dev> <834jp82u5c.fsf@gnu.org> <83ildo189j.fsf@gnu.org> <6e91a10e-e8bb-c7db-f6ce-917790e7e391@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37391"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, philipk@posteo.net, 62720@debbugs.gnu.org, monnier@iro.umontreal.ca, larsi@gnus.org, joaotavora@gmail.com To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 22 14:02:32 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 1pqBwk-0009VO-8x for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Apr 2023 14:02:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqBvT-0007CJ-SQ; Sat, 22 Apr 2023 08:01:11 -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 1pqBvK-0007Ae-Rk for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2023 08:01:04 -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 1pqBvK-0000Qp-8B for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2023 08:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pqBvK-00007h-3o for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2023 08:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Apr 2023 12:01:02 +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.1682164831408 (code B ref 62720); Sat, 22 Apr 2023 12:01:02 +0000 Original-Received: (at 62720) by debbugs.gnu.org; 22 Apr 2023 12:00:31 +0000 Original-Received: from localhost ([127.0.0.1]:42036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqBuo-00006U-E3 for submit@debbugs.gnu.org; Sat, 22 Apr 2023 08:00:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqBuk-00006A-1I for 62720@debbugs.gnu.org; Sat, 22 Apr 2023 08:00:29 -0400 Original-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 ) id 1pqBud-0000Id-1n; Sat, 22 Apr 2023 08:00:19 -0400 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=AtvhxLXieG7R0H7vhHVUuuMclZ21rNj7L/ml320lUEU=; b=nTX4omuL+1wS DpNZu6Erg/fiOzU0g3hYVZwOxEEH9/4X3aTfDfEOPT/eBV/5vaplAdZ0iOdz9JB8o5ih32LoTQHj0 s0jHWNrxHiXOrOdmP5SO3CpHdmliVrr8Wwk6nkQwRkjW9jJJiej8hrYVEsHi5qNpR3054CbcpDVaw 8rZ8QVYwimBYWUzPJHqD6VMBDktCuZb6RMTwZXLI+p0hwPRZlrNMtpOXZ9IDqLmPU34HYlDECgMnZ MxgqBViMiJ9jOcVoPp9OJFkhIAR9+RADZoRX9q8wLzQg4BZDrmvEpCs6a4QPUdsdbbK9y8jBwUD6Z 9eNncrOTTozGqgd1Q16p2g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqBuV-0005ng-FR; Sat, 22 Apr 2023 08:00:17 -0400 In-Reply-To: <6e91a10e-e8bb-c7db-f6ce-917790e7e391@gutov.dev> (message from Dmitry Gutov on Sat, 22 Apr 2023 14:24:47 +0300) 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:260465 Archived-At: > Date: Sat, 22 Apr 2023 14:24:47 +0300 > Cc: jporterbugs@gmail.com, philipk@posteo.net, 62720@debbugs.gnu.org, > joaotavora@gmail.com, larsi@gnus.org, monnier@iro.umontreal.ca > From: Dmitry Gutov > > On 22/04/2023 14:11, Eli Zaretskii wrote: > >> Date: Sat, 22 Apr 2023 13:30:41 +0300 > >> Cc: jporterbugs@gmail.com, philipk@posteo.net, 62720@debbugs.gnu.org, > >> joaotavora@gmail.com, larsi@gnus.org, monnier@iro.umontreal.ca > >> From: Dmitry Gutov > >> > >>> Thanks, but this is not what was being discussed, AFAIU. What I said > >>> I'd agree to is to have package-update accept a prefix argument and > >>> heed package-install-upgrade-built-in (perhaps renamed), > >> > >> I think I explained in the previous email why reusing > >> package-install-upgrade-built-in doesn't seem like a good idea. > > > > And I thought I've explained why I didn't see a need for another > > option. > > I also don't see the point of using an option here. We must not change past behavior unconditionally and by default, not this close to the release. > Also think forward to Emacs 30: I think the most reasonable choice would > be to have package-update upgrade builtins by default, whereas > package-update-all and package-menu-mark-for-upgrades probably still > need to be preffed off (not sure, but we won't be able to make the > choice until later, I think). I don't see why package-update and package-update-all should behave differently wrt core packages. If the user expresses his/her will to update core packages, then package-update-all should do this for all of them. > But if to make package-update behave properly we need to flip the > default of the said option, it will flip the behavior of > package-update-all and package-menu-mark-for-upgrades as well. Which is how it should be, IMO. > >>> and only then > >>> update built-in packages. > >> > >> I asked what plausible scenario you think might be broken by having > >> package-update upgrade builtin package by default. > > > > That's obvious: this is how package-update behaved until now. > > That's not an answer to the question. It is for me (and I'm quite surprised that it is not for you). > >>> I also don't think I like the significant changes in package-update, > >>> nor understand why they are needed. > >> > >> Like I said: the changes are to avoid relying on package-install being > >> able to install a package that's already installed. Which currently > >> works only for builtins and when only a user option is set. It's a mess. > >> > >> And to "avoid interdependency". > > > > Why does this have to be in Emacs 29? It's a cleanup, right? > > Not a cleanup, no. If I just keep the previous version of the code, I > get "package xxx is already installed". Because when upgrading a builtin > package, the "current" version is not deleted. > > So we need to compute the exact version to install (then package-install > does not say "it's already installed" because the installed version is > different). The use of package-install-from-archive might have been a > mistake, though, (in case dependencies need to be updated too) I'm > looking into that now. With prefix argument, or when package-update-built-in is non-nil, the behavior of package-install is different. So just use this, instead of changing the code of package-update. > Alternatively, we could add an optional argument to package-install > which would mean "install the latest version anyway". There is already such an option, added as part of fixing this bug. > >> Just to be clear, we are talking about the 4 lines at the end, right? > > > > Yes, and also the (somewhat mysterious) additions of tests for > > pkg-desc. > > pkg-desc is nil for builtin packages in this case (they are not in > package-alist, so (assq package package-alist) returns nil). This should either be commented, or a variable with a telltale name added to reflect this subtlety.