From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: package-update-all from command line Date: Wed, 25 May 2022 14:27:16 +0200 Message-ID: <877d69223i.fsf@gnu.org> References: <87r14hes20.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21539"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.23; emacs 29.0.50 Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 25 15:11:06 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ntqn4-0005SW-2r for ged-emacs-devel@m.gmane-mx.org; Wed, 25 May 2022 15:11:06 +0200 Original-Received: from localhost ([::1]:32886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntqn2-00025b-SH for ged-emacs-devel@m.gmane-mx.org; Wed, 25 May 2022 09:11:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntqis-0006aW-PX for emacs-devel@gnu.org; Wed, 25 May 2022 09:06:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntqis-0004a8-FJ; Wed, 25 May 2022 09:06:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=b+sypcf+vc266fFinJ95mbXGFrw0KTOCj7GFiG5sItQ=; b=a4CbM1T+VUj8u5 uYgBryz12GD9uz8hfrH8IKTIN6NUjkeNM2eTZUjFQUb2aYBpujkiFBqL03UeHmz1NSd/lDO3PuQa+ r3oiaCkDu7LxpU7fn5xdNejrCHGDw4xq5Xk6CHZDMqQjB8HOkkmaiBGkhiDc3CpYiR1VR1gw2Fo6b RfILvNzdHFG1d1o7QlnzPg65Rwm/u6WBHNIcoOS8aS6g1PV06JyXFRbZbaiRZn81XBnVIG6xa5BPk GlO0GT3W/ABk4hchzv/7tLL4oqe4PSpVwTkaiQnNXFODmndQpm1PWbFGoj/NFQprrdR8co38NQqRG wiXREddfh3d18vakkoog==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:57073) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntqis-0003h1-7s; Wed, 25 May 2022 09:06:46 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 1ECC327C0054; Wed, 25 May 2022 09:06:45 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 25 May 2022 09:06:45 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrjeehgdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepte dujefftdevheffveeitdfgvefggfekudefvdetgeevfeetteefkefggefhgeeinecuffho mhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihht hidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgrsh htmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 May 2022 09:06:44 -0400 (EDT) In-reply-to: <87r14hes20.fsf@gnus.org> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:290247 Archived-At: Lars Ingebrigtsen writes: Hi Lars, >> When seeing that command being introduced, I've also made my own version >> >> (defun th/package-update-all () >> (interactive) >> (package-refresh-contents) >> (package-update-all (called-interactively-p))) >> >> because package-update-all doesn't seem to update the package database. >> I can't see the "Contacting host: elpa.gnu.org" message and the same for >> the other archives. > > Yes, perhaps -update-all should also call -refresh-contents? IMHO, yes. The same question applies to `package-update' but there it would be annoying if it always refreshed first when updating one package after the other. So maybe the refreshes should be restricted to "there hasn't been a refresh in the last ". > By the way, the following also seems to work: > > ./src/emacs -batch -l ~/.emacs -f package-refresh-contents -f package-update-all Indeed. So you another way to handle this issue was to just document the current behavior and add a command line update-all recipe. However, your "emacs -batch -l ~/.emacs ..." recipe doesn't work with every init file, at least it didn't work with mine. I use `user-init-file' in my ~/.emacs.d/init.el which is nil if emacs is started with -batch, and it seems that packages are not initialized so emacs complained about void-function use-package. I've catered for it in my init file now but I guess -batch -l cannot be recommended as a general practice for this purpose. Bye, Tassilo