david writes: > Hi Emacs developers, > > I found a bug in the `describe-package` interface. Here are the steps > to reproduce it: > > 1. Open Emacs and run `M-x list-packages RET`. > 2. Click on a package that is already installed (Status: Installed). > 3. In the "Other versions" section, click on the same version that is > already installed. > 4. The package description now shows "Install" even though the package > is already installed. > 5. If you click "Install", the package is reinstalled, and the "Other > versions" section shows the same version twice as installed. > > The same behavior occurs for packages with Status: dependency. The > difference is that when you click "Install" in `describe-package`, the > package changes its status in `list-packages` from "dependency" to > "installed". Additionally, the package appears duplicated in the "Other > versions" section. However, after restarting Emacs, the package returns > to its original "dependency" status in `list-packages`. > > Expected behavior: > - The "Install" button should not be shown if the package is already > installed. Alternatively, the button could be renamed to "Reinstall" > or replaced with a "Delete" button to better reflect the available > actions for an already installed package. > - The "Other versions" section should not display duplicate entries for > the same installed version. If you click "Install" again, the package > is overwritten, and a third duplicate entry appears as installed. I believe the following patch should address these issues: