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: Tue, 25 Apr 2023 10:47:41 +0300 Message-ID: <83jzy0wggy.fsf@gnu.org> References: <87a5zj2vfo.fsf@gmail.com> <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> <83edoc1602.fsf@gnu.org> <8e4ec101-adc3-0d1b-af3d-cce92f17b874@gutov.dev> <83r0sbyuew.fsf@gnu.org> <83edoazr8k.fsf@gnu.org> <3fb17c71-2a37-b306-472b-d8bc845e5777@gutov.dev> <83a5yyznfe.fsf@gnu.org> <41a79777-2cc6-9562-8915-9f28070b7bc9@gutov.dev> <83cz3txzi5.fsf@gnu.org> <5ae14089-f76f-84a1-d39a-3ec9e473a0aa@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17314"; 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 Tue Apr 25 09:50:34 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 1prDRa-0004FI-Bh for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Apr 2023 09:50:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prDPx-0004oG-PY; Tue, 25 Apr 2023 03:48:53 -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 1prDPk-0004Dy-OX for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 03:48:44 -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 1prDP8-00077Z-7w for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 03:48:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prDP7-0002uo-Ip for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2023 03:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Apr 2023 07:48: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.168240884611020 (code B ref 62720); Tue, 25 Apr 2023 07:48:01 +0000 Original-Received: (at 62720) by debbugs.gnu.org; 25 Apr 2023 07:47:26 +0000 Original-Received: from localhost ([127.0.0.1]:51113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prDOY-0002rf-5Q for submit@debbugs.gnu.org; Tue, 25 Apr 2023 03:47:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prDOV-0002rS-AY for 62720@debbugs.gnu.org; Tue, 25 Apr 2023 03:47:24 -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 1prDOP-0006yq-Bf; Tue, 25 Apr 2023 03:47:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=srcGxmzf+clR/RF8BNOotzimORk2HPhRJy75WY75TWI=; b=gropLGjfnqjGajiihvuF LSVupouD1d+VRtHsVD9w19BPncAiJ9EK2TOen73/D+r60DEDdVv+Q0+nK5xc1FjnBgXiiw6QKzVuI xFOV0sGTcXO4+L+igfDYSq2GS1nkTJfl6gS/cTyheyKe1iMXCZ+FgoOXHxQKuFkzphg6NYeZrwTxB SuZGbwP3ne8PWhVRXt4XrzWWB/rWZuSfyNCG8IsyiccJzVmpbSWgDMVGPWVgM3W76lBjD4yjNbky1 kxrZ/e5nwsSjZZF4KeJsGFPFkyOHudcPKbfwtsDMhVTkC0l4FID0eJeCtGbtsh6m2jOs5eVAwESLW bU08JEB06fwh2A==; 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 1prDOO-0006wg-RF; Tue, 25 Apr 2023 03:47:17 -0400 In-Reply-To: <5ae14089-f76f-84a1-d39a-3ec9e473a0aa@gutov.dev> (message from Dmitry Gutov on Tue, 25 Apr 2023 02:45:46 +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:260596 Archived-At: > Date: Tue, 25 Apr 2023 02:45:46 +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 > > >> So what are we guarding against here? That the user will choose a > >> built-in package to upgrade by accident? > > > > Yes. Also, against invocations of this command from other commands > > and from the menu. > > It's not in the menu. There's this: runs the command package-menu-mark-upgrades (found in package-menu-mode-map), which is an interactive byte-compiled Lisp function in ‘package.el’. It is bound to U. (package-menu-mark-upgrades) Mark all upgradable packages in the Package Menu. For each installed package with a newer version available, place an (I)nstall flag on the available version and a (D)elete flag on the installed version. A subsequent x call will upgrade the package. I also envision that we will at some point have an "upgrade" menu item, because it make little sense to have this command, but not to be able to invoke it from the menu. > There are also no known callers aside from package-update-all. One caller is enough, IMO. > Very well, here's the next version. It adds a new optional argument to > the function (so that people can evaluate e.g. (package-update 'eglot > t)). When called interactively, it is determined by current-prefix-argument. Thanks, this is very close to what I had in mind. The only thing that is missing is the support for user option, which should then avoid the need to invoke the command with a prefix argument. > Also please review the docstring change. It looks OK to me. > Regarding obeying package-install-upgrade-built-in, I think it would > need to be renamed, and both package-update-all and > package-menu-mark-upgrades would need to be made obey it too. All that > could be done in a subsequent change. If the option will affect more than just package-install, it should indeed be renamed. > -(defun package-update (name) > - "Update package NAME if a newer version exists." > +(defun package-update (name &optional update-built-ins) > + "Update package NAME if a newer version exists. > + > +Only packages installed from ELPA are allowed to be updated this > +way. I'm not sure I understand where this restriction comes from. Did the original code enforce it?