GNU bug report logs - #76568
'package-install' should not install duplicate packages

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Tue, 25 Feb 2025 20:53:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Ship Mints <shipmints <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 76568 <at> debbugs.gnu.org
Subject: bug#76568: 'package-install' should not install duplicate packages
Date: Wed, 5 Mar 2025 12:00:55 -0500
[Message part 1 (text/plain, inline)]
On Mon, Mar 3, 2025 at 9:34 PM Stefan Kangas <stefankangas <at> gmail.com> wrote:

> Ship Mints <shipmints <at> gmail.com> writes:
>
> > As part of my production upgrade to 30.1, and before I wrote a program
> to install my local
> > ELPA tree from scratch, I tried to first curate my packages and change
> from MELPA to
> > generally equivalent GNU ELPA or non-GNU ELPA archives.  The result was
> that I had two of
> > each package installed.
> >
> > I think there's a bug in 'package-install' which, when invoked from
> > 'package-install-button-action', processes the new package spec, and
> incorrectly checks to
> > see if the package is already installed.  Interactive invocation of
> 'package-install' yields the
> > package name from the prompt, not its archive description.
> >
> > If the below is correct, I can submit a patch to make 'package-install'
> behave like
> > 'package-reinstall' for the non-interactive case.
>
> Please submit a patch, but could we also have tests for this please?
>
> Thanks in advance.
>

Patch attached.  It prevents the menu-driven case from erasing the already
installed message.  It could suggest to the user to remove and then install
or we could offer to use package upgrade to the chosen package-desc.  At
the very least, the patch prevents duplicates.

-Stephane
[Message part 2 (text/html, inline)]
[0001-Correct-package-install-to-detect-installed-packages.patch (application/octet-stream, attachment)]

This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.