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#65475: 29.1; package-selected-packages variable is not updated when the last package is deleted Date: Tue, 05 Sep 2023 17:10:04 +0000 Message-ID: <87h6o8eec3.fsf@posteo.net> References: <61352d45-21a6-466b-be7b-7755a6260356@gmail.com> <83a5uemfxy.fsf@gnu.org> <87o7iutg4i.fsf@posteo.net> <4604c3e3-8a6a-41b0-bf4d-9c087f151961@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30756"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrey Samsonov , Eli Zaretskii , Stefan Kangas , 65475@debbugs.gnu.org, Stefan Monnier To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 05 19:11:21 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 1qdZaD-0007qd-Fw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Sep 2023 19:11:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdZZv-00053P-Dr; Tue, 05 Sep 2023 13:11: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 1qdZZu-00053C-2S for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 13:11:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdZZt-0007p6-Qb for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 13:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdZZu-0003wi-Bk for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 13:11:02 -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, 05 Sep 2023 17:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65475 X-GNU-PR-Package: emacs Original-Received: via spool by 65475-submit@debbugs.gnu.org id=B65475.169393381615111 (code B ref 65475); Tue, 05 Sep 2023 17:11:02 +0000 Original-Received: (at 65475) by debbugs.gnu.org; 5 Sep 2023 17:10:16 +0000 Original-Received: from localhost ([127.0.0.1]:58802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdZZ9-0003ve-Hv for submit@debbugs.gnu.org; Tue, 05 Sep 2023 13:10:15 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:51331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdZZ6-0003vN-RF for 65475@debbugs.gnu.org; Tue, 05 Sep 2023 13:10:14 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DADEE240105 for <65475@debbugs.gnu.org>; Tue, 5 Sep 2023 19:10:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693933805; bh=3kXbAHc2tEoSrQbo22ob5pM1UvDf2o7JEOLk+tRSVzI=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=rkxC68UH+EXqizZmHdcdY9FM64bmo0T/kftelERV95PdxIZoT4Pk5eOhBmGKHdBz+ ua6x6iDQo69YcAd/ZjwGp1A970Kqu3Cd8nVuFqZXoKDPOnVN7Kq08RaAThi32LZ4qD savH7RSeKFah6MKQuqCvn34eOGH5os7LCo096U/f2RXjG5F1P5rR82YhAioTBAAo3G 1bjtTWXpN+6TxHHHYFSs00zVWX5B6xYXJHLUVjVu/ccrp518GSsNO6BoG/7ydUBx7e EBlrBQBU4QOdwG5Ly1F+3sNqhQvPrK4Qj2qOvvoTc8jCt+4E074CenX5ifjrQMRykr /IyBBRNXcBmYQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RgBp46hGlz6twK; Tue, 5 Sep 2023 19:10:04 +0200 (CEST) In-Reply-To: (Eshel Yaron's message of "Mon, 04 Sep 2023 09:35:31 +0200") 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:269385 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eshel Yaron writes: > Andrey Samsonov writes: > >> 02.09.2023 22:28, Stefan Kangas =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>> Pushed to master as commit 610105ee81b. Andrey, could you please >>> test and report back? >> >> Unfortunately, I am not competent enough to understand exactly what >> steps are required to perform this. I certainly am not able to build >> emacs from source. But I thought to do the following: >> >> 1. Download package.el file from here: >> https://github.com/emacs-mirror/emacs/blob/610105ee81bbf79f72d4efb46d0ca= ddf8d654cf1/lisp/emacs-lisp/package.el >> >> 2. Start 'emacs -Q --init-directory ', where is directory >> with only zero-sized 'init.el' file >> >> 3. Open that downloaded package.el file in emacs buffer and do M-x >> eval-buffer >> >> 4. Do the steps from 2 to 8 in my original bug-report. >> >> I got the same buggy result on step 8: C-h v package-selected-packages >> RET: Its value is (chess) >> > > FWIW, I get the same non-empty `package-selected-packages` with Emacs > master built from source. Indeed it looks like this issue isn't fully > fixed yet. Even if 610105ee81bbf79f72d4efb46d0caddf8d654cf1 was applied? --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index e1172d69bf0..43842cfea73 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1982,7 +1982,10 @@ package--find-non-dependencies (defun package--save-selected-packages (&optional value) "Set and save `package-selected-packages' to VALUE." - (when value + (when (or value after-init-time) + ;; It is valid to set it to nil, for example when the last package + ;; is uninstalled. But it shouldn't be done at init time, to + ;; avoid overwriting configurations that haven't yet been loaded. (setq package-selected-packages value)) (if after-init-time (customize-save-variable 'package-selected-packages package-selected-packages) --=-=-= Content-Type: text/plain Can you edebug the function and see if it behaves the way it should (evaluating the setq expression)? >> I'm not familiar with emacs internals, so can't say where the problem >> now: the bug is still here, or my testing strategy is wrong. >> > > I think your test is alright in this case, and that a bug (maybe another > one) remains. > >> P.S. (Offtopic): I'm also novice at maillists, so confused what should >> I do now in my email client: Reply, Reply to All or Reply to >> List. Sorry please if I did it wrong. > > The key is to keep commenters in the CC so they get your follow up. How > to do that varies between mail clients, but it sounds like Reply to All > would be the best fit. > > > Cheers, > > Eshel --=-=-=--