From unknown Fri Jun 20 07:09:09 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77188 <77188@debbugs.gnu.org> To: bug#77188 <77188@debbugs.gnu.org> Subject: Status: 31.0.50; describe-package: Duplicate installed versions and incorrect Install button state Reply-To: bug#77188 <77188@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:09:09 +0000 retitle 77188 31.0.50; describe-package: Duplicate installed versions and i= ncorrect Install button state reassign 77188 emacs submitter 77188 david severity 77188 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 22 13:42:46 2025 Received: (at submit) by debbugs.gnu.org; 22 Mar 2025 17:42:46 +0000 Received: from localhost ([127.0.0.1]:45339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2rt-0004So-Dj for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:42:46 -0400 Received: from lists.gnu.org ([2001:470:142::17]:46236) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tw2rq-0004SL-6i for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:42:42 -0400 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 1tw2ri-0006Tr-Ix for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2025 13:42:35 -0400 Received: from mail-vk1-xa35.google.com ([2607:f8b0:4864:20::a35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tw2rg-0006m6-Nk for bug-gnu-emacs@gnu.org; Sat, 22 Mar 2025 13:42:34 -0400 Received: by mail-vk1-xa35.google.com with SMTP id 71dfb90a1353d-523dc366e42so1309855e0c.2 for ; Sat, 22 Mar 2025 10:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742665351; x=1743270151; darn=gnu.org; h=mime-version:message-id:date:user-agent:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=N6hwFAVmNDYTb7xMucAE3823xy930lcA5+zCu8/d8mk=; b=jighMnXJWef3XAKgo1SUaWvem98Gv5+igNfjHKr/IbjcEOy39jwxDobMshYgEaXl9t RrCynfrpmwC+VivNplUhCFEu8Dw+wAS6CVteEtSf7Y0EnV9Ek7H2eFMeo0t44FrpmdAU b6bcJ+WZ0TVuv15BMU+0COpR3zQYmP5266Qvf00xOGvPBFdhxn876tI//vae6064achX iu7Tp0ntCFNPiJb8nLvgTFA8g/uOTXVD94Q2p/pze6qOUR+fIOyyFyeIFOpUvMxmzH0q uM+6Hl4G62VFOQN3uZgTDr9Z0XUo+VuhwVrcr2xe4PVVThnRW5DOOrqt7uc3Mmb78tJz iwLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742665351; x=1743270151; h=mime-version:message-id:date:user-agent:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N6hwFAVmNDYTb7xMucAE3823xy930lcA5+zCu8/d8mk=; b=NHaAZnh2GpnXF3fOhZ3yhtfryQF/TB44xeHIzFQNvcQxdsaT4kL+axGZn4ZQgWsR1L UQ15vAcqWid00W8qHFHxY5Tv5qHWRiwm9RB1zmIgYEpQZO3pWTSOV74QDZuCs+z9NJ81 /pglvWuGBREGubWFdBRA3eDp+7vLM5J8G5e6SSfT75GG6XyOSmMXp/M0cIs+5vKDhlDk Bkr9CkJVQ4B7gOMCUQrDXSlmK9Noihn1E3AB7ee+OTPsqt3bmpK1dl7M+4ij31HiyaQ1 gWZX+yBcHpvX7Z+KHY/28qfGO2efg6Jarntx2GJdeYD1JSeklUkBDWBJBRd1cvLqoOAQ Mdnw== X-Gm-Message-State: AOJu0YxjPJQvHxu+18XrhyqStgZPwKSoF8ceUMPPFSi3Vpu0x4tN5qQd PzJJSP3qnCs+c/+lOwLeiSsKvVoWybC9gsGlIX5OD1DQAubpWMueOS2eX3/P X-Gm-Gg: ASbGnctj51l3AXFEgVKa+FUN6v4JFu4QE6Y3qZgYtftNNbLHwKpjlXJVUaz8PZS6gIa aslJLGgdhXz72mh0M1sPajWRsIdnq45pH6z+ToyxjMaF0LwYZ8XHUs24O9aCZxw2Ru03QYWQEc+ 9081LimNDshvtWFHuFMi/AQDzkA1GuUtkhdnlVS6DFwkNfEdY/qai3J+vB3AzquLSF0VghN0Za5 SlnrWI095/IoSNZ32piUQ3CbF/MRk7MxdeFdjlQaiwBcGea079JpJQWZuUiyJTMTUo3T1XWsqqe 7kFX4dynbeDvKWYtSBd7wGCFugmvpQVkPG9dXw== X-Google-Smtp-Source: AGHT+IG9xiVNu7iVU8clkWz0laiW1F1V+gapzAyw6hZhjVLcBukfBkTcfFd1AbFOwikS9EJYNs89ZQ== X-Received: by 2002:a05:6122:88c:b0:520:60c2:3f1 with SMTP id 71dfb90a1353d-525a80d0547mr5379214e0c.0.1742665351240; Sat, 22 Mar 2025 10:42:31 -0700 (PDT) Received: from fedora ([190.6.34.182]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-525a7670041sm807845e0c.44.2025.03.22.10.42.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Mar 2025 10:42:30 -0700 (PDT) From: david To: bug-gnu-emacs@gnu.org Subject: 31.0.50; describe-package: Duplicate installed versions and incorrect Install button state User-Agent: mu4e 1.12.8; emacs 31.0.50 Date: Sat, 22 Mar 2025 13:42:21 -0400 Message-ID: <87jz8h9d36.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::a35; envelope-from=davidimagid@gmail.com; helo=mail-vk1-xa35.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 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. In GNU Emacs 31.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2) of 2025-03-16 built on fedora Repository revision: eab14d68b2e72b9a6b8b0cc67c9667c2bfbed4f5 Repository branch: master System Description: Fedora Linux 41 (Workstation Edition) Configured using: 'configure --with-imagemagick --with-pgtk --with-tree-sitter --with-mailutils --with-sound=yes --with-pdumper=yes --with-dumping=pdumper --with-file-notification=yes --with-gnutls' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr ert ewoc debug backtrace org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src sh-script smie treesit executable ob-comint org-pcomplete pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs format-spec debbugs-gnu pcase add-log debbugs soap-client warnings rng-xsd rng-dt rng-util xsd-regexp xml debbugs-compat bug-reference thingatpt info debbugs-autoloads easy-mmode loaddefs-gen radix-tree tar-mode arc-mode archive-mode cl-extra help-mode misearch multi-isearch mm-archive mule-util cus-edit pp cus-start cus-load wid-edit gnutls network-stream url-cache url-http url-auth url-gw nsm display-line-numbers finder-inf package browse-url xdg url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs icons json map byte-opt gv url-vars emacsbug lisp-mnt message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils compile text-property-search comint ansi-osc ansi-color ring comp-run bytecomp byte-compile comp-common rx time-date subr-x cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win touch-screen pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk multi-tty move-toolbar make-network-process tty-child-frames native-compile emacs) Memory information: ((conses 16 422845 65583) (symbols 48 20294 0) (strings 32 88877 8835) (string-bytes 1 2486247) (vectors 16 35552) (vector-slots 8 422683 21928) (floats 8 128 150) (intervals 56 25436 217) (buffers 992 17)) From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 29 08:08:56 2025 Received: (at 77188) by debbugs.gnu.org; 29 Mar 2025 12:08:56 +0000 Received: from localhost ([127.0.0.1]:57389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tyUzf-0007gc-QV for submit@debbugs.gnu.org; Sat, 29 Mar 2025 08:08:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40706) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tyUzd-0007gN-IK for 77188@debbugs.gnu.org; Sat, 29 Mar 2025 08:08:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tyUzX-0000kY-MC; Sat, 29 Mar 2025 08:08:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ywpHp2gklmIQuS1rpSkTnSJcvw/LcLXnuFE2dKXEvsw=; b=G9L2Z0m6295j x2tg9RCXmyEPOIkWy6Uf8aQeuQDFTXbWmjYGEzI6mpjAghE+Xubn2eDaAYaNt9/0oF9BGJ94v8jWB Qh/6SC5JNxVmmR3CkwSoCtIItQMrlLGMrXipYDA9fHpk410H9zL41nTHmau3IdDE8UumcM1Jw6NdJ GAKckhGzr/qKroFz/ZMQ6MIf3E84rGIROpSDWWs1EwmNJkt2aOZbnPvnnnaVcYc2hkRqrQPW44OqJ W6QrT+0sYLry5/chwvr+YErmRhLKv+epIFioczsTOPk6KUxNICLR9xlPWOTcQJioUi7lJkxlAtyEb Tm3TPvDCtpI//SwHZ6cbcw==; Date: Sat, 29 Mar 2025 15:08:46 +0300 Message-Id: <86h63c6nu9.fsf@gnu.org> From: Eli Zaretskii To: david , Philip Kaludercic , Stefan Monnier In-Reply-To: <87jz8h9d36.fsf@gmail.com> (message from david on Sat, 22 Mar 2025 13:42:21 -0400) Subject: Re: bug#77188: 31.0.50; describe-package: Duplicate installed versions and incorrect Install button state References: <87jz8h9d36.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77188 Cc: 77188@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: david > Date: Sat, 22 Mar 2025 13:42:21 -0400 > > 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. > > In GNU Emacs 31.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version > 3.24.43, cairo version 1.18.2) of 2025-03-16 built on fedora > Repository revision: eab14d68b2e72b9a6b8b0cc67c9667c2bfbed4f5 > Repository branch: master > System Description: Fedora Linux 41 (Workstation Edition) > > Configured using: > 'configure --with-imagemagick --with-pgtk --with-tree-sitter > --with-mailutils --with-sound=yes --with-pdumper=yes > --with-dumping=pdumper --with-file-notification=yes --with-gnutls' Thanks. Philip and Stefan, any comments? From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 11 11:06:13 2025 Received: (at 77188) by debbugs.gnu.org; 11 Apr 2025 15:06:14 +0000 Received: from localhost ([127.0.0.1]:51218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3FxN-0004kp-4X for submit@debbugs.gnu.org; Fri, 11 Apr 2025 11:06:13 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56215) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3FxI-0004kP-Sk for 77188@debbugs.gnu.org; Fri, 11 Apr 2025 11:06:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 02CD8240101 for <77188@debbugs.gnu.org>; Fri, 11 Apr 2025 17:06:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1744383962; bh=FdNZD8XlkGJu9/V6dzTRM6PeUpmhMEzzzqu/44pCsIs=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=A9K/p1f/JxJ6s9FUfKH7BO8wD9UBhfSLnuEYJx6qj/QC343uTeODuw+OlbaGWx6QB NCyj+djMv67XjOXSxWooHFYN+k6XZRO5y68VlKxVlnsjImwlXnT3e8dJSMRtEHKx/r KK6oFdEIkaQBQyJIjsM7oh2F1heHW9dLQc3HdOPcuaC5qIXALhiNTHd54MzSfQBx09 Qg1QpPPP9LKeh+tnNLsK2wPKbbLFAxFiJbxM5jh0twovH1ir1/j8tJHrBb2u81VBdz djbt75EUBmcQ1F05GXanpLHu7WDJjGIo/n4trxjbFyeUNv7WVJ/WzJBCnN3hwMelAE OtMmyTKO2ADNw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4ZZ0PP2p2hz9rxF; Fri, 11 Apr 2025 17:06:01 +0200 (CEST) From: Philip Kaludercic To: david Subject: Re: bug#77188: 31.0.50; describe-package: Duplicate installed versions and incorrect Install button state In-Reply-To: <87jz8h9d36.fsf@gmail.com> References: <87jz8h9d36.fsf@gmail.com> 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 OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 11 Apr 2025 15:06:00 +0000 Message-ID: <87plhid9gn.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77188 Cc: 77188@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain 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: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 83bc36a4596..c3f3b9c9803 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2890,8 +2891,9 @@ describe-package-1 (insert " from " (format "%s" archive)) (insert " -- ") (package-make-button - "Install" - 'action 'package-install-button-action + (if (package-installed-p (package-desc-name pkg)) + "Reinstall" "Install") + 'action #'package-install-button-action 'package-desc desc)) (t (insert (capitalize status) "."))) (insert "\n") @@ -2983,7 +2985,7 @@ describe-package-1 (cdr (assq name package-archive-contents)) (let ((bi (assq name package--builtins))) (if bi (list (package--from-builtin bi)))))) - (other-pkgs (delete desc all-pkgs))) + (other-pkgs (delete-dups (delete desc all-pkgs)))) (when other-pkgs (package--print-help-section "Other versions" (mapconcat (lambda (opkg) --=-=-= Content-Type: text/plain > In GNU Emacs 31.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version > 3.24.43, cairo version 1.18.2) of 2025-03-16 built on fedora > Repository revision: eab14d68b2e72b9a6b8b0cc67c9667c2bfbed4f5 > Repository branch: master > System Description: Fedora Linux 41 (Workstation Edition) > > Configured using: > 'configure --with-imagemagick --with-pgtk --with-tree-sitter > --with-mailutils --with-sound=yes --with-pdumper=yes > --with-dumping=pdumper --with-file-notification=yes --with-gnutls' > > Configured features: > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ > IMAGEMAGICK JPEG LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES > NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 > THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB > > Important settings: > value of $LANG: en_US.UTF-8 > value of $XMODIFIERS: @im=ibus > locale-coding-system: utf-8-unix > > Major mode: Lisp Interaction > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > minibuffer-regexp-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > > Load-path shadows: > None found. > > Features: > (shadow sort mail-extr ert ewoc debug backtrace org ob ob-tangle ob-ref > ob-lob ob-table ob-exp org-macro org-src sh-script smie treesit > executable ob-comint org-pcomplete pcomplete org-list org-footnote > org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval > org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs > find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs > format-spec debbugs-gnu pcase add-log debbugs soap-client warnings > rng-xsd rng-dt rng-util xsd-regexp xml debbugs-compat bug-reference > thingatpt info debbugs-autoloads easy-mmode loaddefs-gen radix-tree > tar-mode arc-mode archive-mode cl-extra help-mode misearch multi-isearch > mm-archive mule-util cus-edit pp cus-start cus-load wid-edit gnutls > network-stream url-cache url-http url-auth url-gw nsm > display-line-numbers finder-inf package browse-url xdg url url-proxy > url-privacy url-expand url-methods url-history url-cookie > generate-lisp-file url-domsuf url-util url-handlers url-parse > auth-source cl-seq eieio eieio-core cl-macs icons json map byte-opt gv > url-vars emacsbug lisp-mnt message mailcap yank-media puny dired > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 > mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums > mm-util mail-prsvr mail-utils compile text-property-search comint > ansi-osc ansi-color ring comp-run bytecomp byte-compile comp-common rx > time-date subr-x cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc > paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode > mwheel term/pgtk-win pgtk-win term/common-win touch-screen pgtk-dnd > tool-bar dnd fontset image regexp-opt fringe tabulated-list replace > newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar > rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock > font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq > simple cl-generic indonesian philippine cham georgian utf-8-lang > misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms > cp51932 hebrew greek romanian slovak czech european ethiopic indian > cyrillic chinese composite emoji-zwj charscript charprop case-table > epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button > loaddefs theme-loaddefs faces cus-face macroexp files window > text-properties overlay sha1 md5 base64 format env code-pages mule > custom widget keymap hashtable-print-readable backquote threads dbusbind > inotify dynamic-setting system-font-setting font-render-setting cairo > gtk pgtk multi-tty move-toolbar make-network-process tty-child-frames > native-compile emacs) > > Memory information: > ((conses 16 422845 65583) (symbols 48 20294 0) (strings 32 88877 8835) > (string-bytes 1 2486247) (vectors 16 35552) > (vector-slots 8 422683 21928) (floats 8 128 150) > (intervals 56 25436 217) (buffers 992 17)) --=-=-=--