From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 19:39:42 +0200 Message-ID: References: <61352d45-21a6-466b-be7b-7755a6260356@gmail.com> <83a5uemfxy.fsf@gnu.org> <87o7iutg4i.fsf@posteo.net> <4604c3e3-8a6a-41b0-bf4d-9c087f151961@gmail.com> <87h6o8eec3.fsf@posteo.net> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20740"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Andrey Samsonov , Eli Zaretskii , Stefan Kangas , 65475@debbugs.gnu.org, Stefan Monnier To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 05 19:40:23 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 1qda2I-0005Bb-Po for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Sep 2023 19:40:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qda23-0007xE-VC; Tue, 05 Sep 2023 13:40:07 -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 1qda1y-0007vO-Va for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 13:40:03 -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 1qda1x-0004W1-Te for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 13:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qda1y-0001Z9-Ay for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 13:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Sep 2023 17:40: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.16939355905994 (code B ref 65475); Tue, 05 Sep 2023 17:40:02 +0000 Original-Received: (at 65475) by debbugs.gnu.org; 5 Sep 2023 17:39:50 +0000 Original-Received: from localhost ([127.0.0.1]:58919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qda1m-0001Yb-4u for submit@debbugs.gnu.org; Tue, 05 Sep 2023 13:39:50 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:56954 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qda1j-0001YS-7i for 65475@debbugs.gnu.org; Tue, 05 Sep 2023 13:39:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1693935586; bh=oS9vOEa0ZmmYEe+8VQCN0FyeNP34EtaKEK/hsLVGp0g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=AmjRL1WUntxl8ATo0tv/8lAIRfJs23tG3Z96BXPbTyQyFXWCZUsp+8Q1zAgMjqjE2 NhL/bgSSIyRPZs3FU1pZ730ZZ+cb/K2eDMzkqmRqQeEMN0+vt4GcdcGCdIWVeM2fIU 2y9rwGL6riM9XVYpae33EwcGIcip67BW5x9ZJKdhKrFEy/0SKojEBgQBvl8Q+JuWPu bBPmMOnkvX9QAHC/R6pGqg993Gz3v6XUKUFVgmIo90ER3+ALMZu/3+CcOEoTPur5h5 Sp1AtR5vJOBCS0gQzQ6x2B8zJXcQS6KAblGIkMoZAKUQDJJB0DWJkAgAt57rxVFuJC +nhoVYZNBlyhQ== In-Reply-To: <87h6o8eec3.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 05 Sep 2023 17:10:04 +0000") 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:269389 Archived-At: Philip Kaludercic writes: > Eshel Yaron writes: > >> 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? Of course. > > Can you edebug the function and see if it behaves the way it should > (evaluating the setq expression)? > AFAICT, `package--save-selected-packages` works fine now. The problem is elsewhere. Namely, when deleting the last package with `package-delete`, what happens is that `package--save-selected-packages` gets called twice. The first time, it's called by `package--save-selected-packages` with a nil argument. This works as expected and sets `package-selected-packages` to nil. But then, `package--save-selected-packages` is called again by `package--used-elsewhere-p` through `package-desc-status` and `package--user-selected-p`, this time with a non-nil value `(chess)` that's taken from `package-alist`, which is not yet updated at this point in `package-delete`. So `package-selected-packages` gets reset to a non-nil value.