unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jimmy Wong <wyuenho@gmail.com>
To: Philip Kaludercic <philipk@posteo.net>, Eli Zaretskii <eliz@gnu.org>
Cc: 63338@debbugs.gnu.org
Subject: bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
Date: Tue, 9 May 2023 03:56:46 +0100	[thread overview]
Message-ID: <5727a6ad-b2c6-4c8f-ac85-b6478c57a749@Spark> (raw)
In-Reply-To: <83h6snc9ms.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]

I don’t think you should dedup the variable that could have been modified by something else such as package-install. This may make debugging harder should package.el itself introduce a bug that duplicates pacakages in the variable. How about just using good old add-to-list?
On 8 May 2023 at 1:03 PM +0100, Eli Zaretskii <eliz@gnu.org>, wrote:
> > Cc: 63338@debbugs.gnu.org
> > From: Philip Kaludercic <philipk@posteo.net>
> > Date: Mon, 08 May 2023 10:36:55 +0000
> >
> > Jimmy Yuen Ho Wong <wyuenho@gmail.com> writes:
> >
> > > Reproduction:
> > >
> > > 0. (setq custom-file (const user-emacs-directory "custom.el"))
> > > 1. M-x package-vc-install company
> > > 2. M-x package-vc-install company RET y
> > > 3. C-x C-f ~/.emacs/custom.el
> > > 4. Observe that `company` has been listed twice under
> > > `package-selected-packages`.
> > >
> > > Expectation:
> > >
> > > Installing the same package twice should not result in its duplication
> > > in `package-selected-packages`.
> >
> > An easy fix would be just to ensure that package-selected-packages is
> > always deduplicated before assigning the value:
>
> This is OK for the emacs-29 branch, thanks.

[-- Attachment #2: Type: text/html, Size: 1686 bytes --]

  reply	other threads:[~2023-05-09  2:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06 23:27 bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages Jimmy Yuen Ho Wong
2023-05-08 10:36 ` Philip Kaludercic
2023-05-08 12:04   ` Eli Zaretskii
2023-05-09  2:56     ` Jimmy Wong [this message]
2023-05-10  6:56       ` Philip Kaludercic
2023-05-13 17:18         ` Philip Kaludercic
2023-05-14 12:51           ` Jimmy Wong
2023-05-16 19:31             ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5727a6ad-b2c6-4c8f-ac85-b6478c57a749@Spark \
    --to=wyuenho@gmail.com \
    --cc=63338@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).