* bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
@ 2023-05-06 23:27 Jimmy Yuen Ho Wong
2023-05-08 10:36 ` Philip Kaludercic
0 siblings, 1 reply; 8+ messages in thread
From: Jimmy Yuen Ho Wong @ 2023-05-06 23:27 UTC (permalink / raw)
To: 63338
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`.
In GNU Emacs 29.0.90 (build 1, aarch64-apple-darwin22.4.0, NS
appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a)) of 2023-05-04
built on MobileCat.localdomain
Windowing system distributor 'Apple', version 10.3.2299
System Description: macOS 13.3.1
Configured using:
'configure --prefix=/opt/local --disable-silent-rules --without-dbus
--without-gconf --without-libotf --without-m17n-flt --with-libgmp
--with-gnutls --with-json --with-xml2 --with-modules --infodir
/opt/local/share/info/emacs --with-sqlite3 --with-webp --with-ns
--with-lcms2 --without-harfbuzz --without-imagemagick --without-xaw3d
--with-tree-sitter --with-rsvg --with-xwidgets
--with-native-compilation=aot 'CFLAGS=-pipe -Os -Wno-attributes
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch
arm64' 'CPPFLAGS=-I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath
/opt/local/lib/gcc12 -Wl,-no_pie
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
-arch arm64''
Configured features:
ACL GIF GLIB GMP GNUTLS JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XWIDGETS ZLIB
Important settings:
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: ELisp/l
Minor modes in effect:
which-key-mode: t
smooth-scrolling-mode: t
auto-compile-on-save-mode: t
auto-compile-mode: t
amx-mode: t
pdf-occur-global-minor-mode: t
global-whitespace-cleanup-mode: t
whitespace-cleanup-mode: t
global-move-dup-mode: t
move-dup-mode: t
global-aggressive-indent-mode: t
magit-todos-mode: t
diff-hl-flydiff-mode: t
projectile-rails-global-mode: t
elisp-def-mode: t
company-quickhelp-mode: t
company-quickhelp-local-mode: t
company-prescient-mode: t
rainbow-mode: t
display-line-numbers-mode: t
beginend-prog-mode: t
page-break-lines-mode: t
ido-vertical-mode: t
ido-ubiquitous-mode: t
crm-custom-mode: t
direnv-mode: t
imenu-list-minor-mode: t
purpose-mode: t
dap-tooltip-mode: t
show-smartparens-global-mode: t
show-smartparens-mode: t
smartparens-global-mode: t
smartparens-mode: t
projectile-mode: t
editorconfig-mode: t
rxt-global-mode: t
rxt-mode: t
global-origami-mode: t
origami-mode: t
flx-ido-mode: t
global-git-commit-mode: t
global-flycheck-mode: t
subword-mode: t
global-diff-hl-show-hunk-mouse-mode: t
diff-hl-show-hunk-mouse-mode: t
global-diff-hl-mode: t
diff-hl-mode: t
dap-ui-many-windows-mode: t
dap-ui-controls-mode: t
dap-ui-mode: t
dap-auto-configure-mode: t
dap-mode: t
treemacs-filewatch-mode: t
treemacs-follow-mode: t
treemacs-git-mode: t
treemacs-fringe-indicator-mode: t
csv-field-index-mode: t
prescient-persist-mode: t
global-company-mode: t
company-mode: t
windmove-mode: t
yas-minor-mode: t
shell-dirtrack-mode: t
winner-mode: t
which-function-mode: t
server-mode: t
savehist-mode: t
save-place-mode: t
recentf-mode: t
minibuffer-depth-indicate-mode: t
ido-everywhere: t
global-so-long-mode: t
global-hl-line-mode: t
global-auto-revert-mode: t
icomplete-vertical-mode: t
icomplete-mode: t
desktop-save-mode: t
delete-selection-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
window-divider-mode: t
buffer-read-only: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
visual-line-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
temp-buffer-resize-mode: t
Load-path shadows:
/Users/wyuenho/.emacs.d/elpa/all-the-icons/all-the-icons-faces hides /Users/wyuenho/.emacs.d/elpa/all-the-icons-20230505.1635/all-the-icons-faces
/Users/wyuenho/.emacs.d/elpa/all-the-icons/all-the-icons-pkg hides /Users/wyuenho/.emacs.d/elpa/all-the-icons-20230505.1635/all-the-icons-pkg
/Users/wyuenho/.emacs.d/elpa/all-the-icons/all-the-icons hides /Users/wyuenho/.emacs.d/elpa/all-the-icons-20230505.1635/all-the-icons
/Users/wyuenho/.emacs.d/elpa/all-the-icons/all-the-icons-autoloads hides /Users/wyuenho/.emacs.d/elpa/all-the-icons-20230505.1635/all-the-icons-autoloads
/Users/wyuenho/.emacs.d/elpa/cmake-mode-20230422.828/cmake-mode hides /opt/local/share/emacs/site-lisp/cmake-mode
/Users/wyuenho/.emacs.d/elpa/transient-20230501.1034/transient hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/transient
/Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-jump hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-jump
/Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-ensure hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-ensure
/Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-core hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-core
/Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-delight hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-delight
/Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-diminish hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-diminish
/Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package
/Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-bind-key hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-bind-key
/Users/wyuenho/.emacs.d/elpa/use-package-20230426.2324/use-package-lint hides /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/use-package/use-package-lint
Features:
(shadow mail-extr emacsbug two-column misearch multi-isearch
visual-regexp-steroids tabify which-key smooth-scrolling auto-compile
amx cus-start pdf-occur all-the-icons-dired dired-collapse flycheck-cask
flycheck-inline whitespace-cleanup-mode move-dup aggressive-indent
vc-bzr vc-src vc-sccs vc-cvs vc-rcs window-purpose-x shut-up ibuffer-vc
dired-hide-dotfiles shrink-path git-timemachine magit-lfs magit-todos
diff-hl-flydiff projectile-rails lsp-metals lsp-sourcekit cargo
rust-ts-mode yard-mode lsp-pyright pet lsp-jedi python-pytest
python-isort python-black python-insert-docstring jq-format prettier
flycheck-package elisp-def eterm-256color company-quickhelp
company-prescient company-yasnippet quick-peek rainbow-mode
display-line-numbers beginend smartparens-config smartparens-javascript
smartparens-ml smartparens-rst smartparens-org smartparens-python
smartparens-html smartparens-c page-break-lines lsp-ui lsp-ui-flycheck
pdf-loader iedit ido-vertical-mode ido-completing-read+ crm-custom
scroll-on-jump browse-kill-ring direnv exec-path-from-shell
all-the-icons-data-clockface all-the-icons-data-material-icons
all-the-icons-data-fluentui-system-icons
all-the-icons-data-fontawesome-4 all-the-icons-data-weather-icons
all-the-icons-data-vscode-codicons all-the-icons-data-octicons
all-the-icons-data-mfixx all-the-icons-data-file-icons
all-the-icons-data-devopicons company-oddmuse company-keywords
company-etags company-gtags company-dabbrev-code company-files
company-clang company-capf company-cmake company-semantic company-bbdb
package-vc spaceline-config solarized-dark-theme solarized-theme delight
quelpa-use-package quelpa eshell esh-cmd esh-ext esh-opt esh-proc esh-io
esh-arg esh-module esh-groups esh-util exec-path-from-shell-autoloads
quelpa-use-package-autoloads quelpa-autoloads
yasnippet-snippets-autoloads yasnippet-snippets yarn-mode-autoloads
yard-mode-autoloads imenu-list window-purpose window-purpose-fixes
window-purpose-prefix-overload window-purpose-layout
window-purpose-switch window-purpose-core window-purpose-configuration
window-purpose-utils window-purpose-autoloads whitespace
whitespace-cleanup-mode-autoloads which-key-autoloads wgrep-ag-autoloads
web-mode-autoloads vundo-autoloads term/xterm xterm vterm-autoloads
visual-regexp visual-regexp-steroids-autoloads visual-regexp-autoloads
verb verb-autoloads mc-separate-operations rectangular-region-mode
mc-mark-pop mc-edit-lines mc-hide-unmatched-lines-mode mc-mark-more
mc-cycle-cursors multiple-cursors-core multiple-cursors-autoloads
use-package-autoloads dap-mouse udev-mode-autoloads tuareg tuareg-compat
tuareg-opam flymake-proc flymake caml-types caml-help tuareg-autoloads
caml caml-autoloads ts-comint-autoloads hcl-mode
terraform-mode-autoloads hcl-mode-autoloads swift-mode-imenu
swift-mode-repl swift-mode-font-lock swift-mode-fill
swift-mode-standard-types swift-mode-beginning-of-defun
swift-mode-indent swift-mode-lexer swift-mode-autoloads svg-lib
svg-lib-autoloads string-inflection-autoloads generic
ssh-config-mode-autoloads sphinx-doc-autoloads spaceline-segments
spaceline powerline spaceline-autoloads solarized-palettes solarized
solarized-faces solarized-theme-autoloads smooth-scrolling-autoloads
smartparens-markdown smartparens-text smartparens-ruby smartparens
loadhist smartparens-autoloads smart-semicolon-autoloads
shut-up-autoloads shrink-path-autoloads shift-number-autoloads
scroll-on-jump-autoloads sbt-mode sbt-mode-rgrep sbt-mode-comint
sbt-mode-buffer sbt-mode-project sbt-mode-vars sbt-mode-autoloads
haml-mode sass-mode-autoloads js c-ts-common css-mode eww url-queue shr
pixel-fill kinsoku url-file svg mm-url gnus nnheader range
haml-mode-autoloads ron-mode-autoloads rg rg-info-hack rg-menu
rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header rg-autoloads
wgrep-autoloads repeat repeat-help-autoloads reason-interaction refmt
reason-indent reason-mode-autoloads rainbow-mode-autoloads
quick-peek-autoloads python-pytest-autoloads python-isort-autoloads
python-insert-docstring-autoloads python-docstring-autoloads
python-black-autoloads protobuf-mode-autoloads rake inflections inf-ruby
autoinsert projectile projectile-rails-autoloads inflections-autoloads
inf-ruby-autoloads rake-autoloads editorconfig nvm iter2
prettier-autoloads iter2-autoloads nvm-autoloads powerline-separators
powerline-themes powerline-autoloads po-mode-autoloads pet-autoloads
pdf-links pdf-tools pdf-isearch tablist pdf-misc pdf-view pdf-cache
pdf-info tq pdf-util pdf-macs pdf-tools-autoloads tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
tablist-autoloads page-break-lines-autoloads package-utils-autoloads
restart-emacs-autoloads package-build package-build-badges
package-recipe package-build-autoloads osx-trash-autoloads
olivetti-autoloads nodejs-repl-autoloads move-dup-autoloads
monky-autoloads pcre2el rxt hl-todo magit-todos-autoloads smtpmail
dired-aux async async-autoloads re-builder pcre2el-autoloads
magit-lfs-autoloads cmacexp macrostep macrostep-autoloads lsp-ui-doc
xwidget image-mode exif lsp-ui-imenu lsp-ui-peek lsp-ui-sideline
goto-addr lsp-ui-util lsp-ui-autoloads lsp lsp-sourcekit-autoloads
lsp-pyright-autoloads origami lsp-origami-autoloads origami-parsers
origami-autoloads view lsp-metals-treeview treemacs-extensions
lsp-metals-protocol lsp-metals-autoloads scala-mode-prettify-symbols
scala-mode-imenu scala-mode-map scala-mode-fontlock scala-mode-paragraph
scala-mode-indent scala-mode-lib scala-mode-syntax scala-mode-autoloads
lsp-jedi-autoloads dap-java lsp-java request lsp-java-autoloads
request-autoloads lorem-ipsum-autoloads kurecolor-autoloads
jsonian-autoloads jq-mode jq-mode-autoloads reformatter
jq-format-autoloads impostman-autoloads hideshow imenu-list-autoloads
imenu-anywhere-autoloads help-macro iedit-lib rect iedit-autoloads
ido-vertical-mode-autoloads flx-ido memoize minibuf-eldef
ido-completing-read+-autoloads memoize-autoloads ibuffer-vc-autoloads
align ialign-autoloads hl-todo-autoloads
highlight-indent-guides-autoloads trace edebug info-look help-fns
elisp-refs helpful-autoloads groovy-mode groovy-mode-autoloads
graphviz-dot-mode-autoloads graphql-mode-autoloads find-file ffap
go-mode-autoloads git-timemachine-autoloads gitignore-mode
gitconfig-mode gitattributes-mode git-modes-autoloads forge-list
forge-commands forge-semi forge-bitbucket forge-gogs gogs forge-gitea
gtea forge-gitlab glab forge-github forge-notify forge-revnote
forge-pullreq forge-issue forge-topic bug-reference forge-post
forge-repo forge forge-core forge-db closql buck forge-autoloads
closql-autoloads sqlite emacsql-sqlite-common emacsql emacsql-compiler
emacsql-autoloads ghub-graphql treepy gsexp ghub ghub-autoloads
treepy-autoloads ediff ediff-merg ediff-mult ediff-wind ediff-diff
ediff-help ediff-init ediff-util magit-bookmark magit-submodule
magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log magit-diff smerge-mode git-commit
magit-core magit-autorevert magit-margin magit-transient magit-process
magit-mode magit-git magit-base magit-section crm magit-autoloads
with-editor transient log-edit add-log git-commit-autoloads benchmark
cursor-sensor magit-section-autoloads with-editor-autoloads edmacro
kmacro compat transient-autoloads ert-x compat-macs compat-autoloads
fontify-face-autoloads focus-autoloads flycheck-projectile-autoloads
skeleton ibuf-macs grep ibuf-ext ibuffer ibuffer-loaddefs
projectile-autoloads plantuml-mode flycheck-plantuml-autoloads
plantuml-mode-autoloads package-lint flycheck-package-autoloads
flycheck-inline-autoloads flycheck-golangci-lint-autoloads
flycheck-cask-autoloads flycheck jka-compr flycheck-autoloads epl
pkg-info-autoloads epl-autoloads flx-isearch-autoloads flx
flx-ido-autoloads flx-autoloads org-element org-persist xdg org-id
org-refile avl-tree cap-words superword subword ruby-mode smie rng-nxml
rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util
rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-enc
xmltok html-mode-expansions sgml-mode facemenu er-basic-expansions
expand-region-core expand-region-custom expand-region-autoloads
xterm-color eterm-256color-autoloads xterm-color-autoloads
enh-ruby-mode-autoloads cl emmet-mode-autoloads elisp-refs-autoloads
elisp-def-autoloads editorconfig-core editorconfig-core-handle
editorconfig-fnmatch conf-mode editorconfig-autoloads
dotenv-mode-autoloads docker-compose-mode-autoloads yaml-mode-autoloads
direnv-autoloads dired-single-autoloads dired-hide-dotfiles-autoloads
dired-hacks-utils dired-collapse-autoloads dired-hacks-utils-autoloads
diff-hl-show-hunk diff-hl-inline-popup diff-hl-dired diff diff-hl
face-remap vc-hg log-view pcvs-util vc-dir vc diff-hl-autoloads
delight-autoloads default-text-scale-autoloads lsp-pwsh lsp-kotlin
dap-ui lsp-treemacs gdb-mi bindat gud bui lsp-lens dap-utils xml
dap-mode dap-tasks dap-launch lsp-docker dap-overlays dap-mode-autoloads
bui-list bui-info bui-entry bui-core bui-history bui-button bui-utils
cus-edit bui-autoloads lsp-treemacs-generic lsp-treemacs-themes
treemacs-treelib lsp-treemacs-autoloads treemacs treemacs-header-line
treemacs-compatibility treemacs-mode treemacs-bookmarks vc-git diff-mode
vc-dispatcher treemacs-mouse-interface thunk treemacs-tags
treemacs-faces treemacs-interface treemacs-persistence
treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering
treemacs-annotations bookmark treemacs-async treemacs-visuals
treemacs-fringe-indicator treemacs-icons treemacs-themes pulse
treemacs-workspaces treemacs-scope treemacs-dom treemacs-core-utils
treemacs-macros treemacs-logging treemacs-customization pfuture
treemacs-autoloads ace-window avy ace-window-autoloads avy-autoloads
pfuture-autoloads org org-macro org-pcomplete org-list org-footnote
org-faces org-entities ob-emacs-lisp org-table org-loaddefs cal-menu
calendar cal-loaddefs hydra hydra-autoloads cfrs-autoloads posframe
posframe-autoloads yaml lsp-docker-autoloads lsp-javascript lsp-html
lsp-icons lsp-completion lsp-semantic-tokens dom lsp-mode lsp-protocol
lv ht f f-shortdoc lsp-mode-autoloads lv-autoloads f-autoloads
yaml-autoloads inline ht-autoloads python treesit cycle-quotes
cycle-quotes-autoloads csv-mode sort csv-mode-autoloads crux-autoloads
crm-custom-autoloads ov coverage-autoloads ov-autoloads pos-tip
company-quickhelp-autoloads pos-tip-autoloads prescient
company-prescient-autoloads char-fold prescient-autoloads
native-complete company-native-complete-autoloads
native-complete-autoloads tempo make-mode ispell etags fileloop
generator company-dabbrev company-template company company-autoloads
cmake-font-lock-autoloads rst cmake-mode-autoloads cask-mode-autoloads
xref project cargo-process tramp tramp-loaddefs trampver
tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp
cargo-autoloads buttercup-compat buttercup-autoloads bug-hunter ert ewoc
debug backtrace bug-hunter-autoloads windmove buffer-move-autoloads
advice browse-kill-ring-autoloads beginend-autoloads yasnippet
auto-yasnippet-autoloads yasnippet-autoloads auto-compile-autoloads ob
ob-tangle ol org-src ob-ref ob-lob ob-table ob-exp ob-comint ob-core
org-cycle org-fold org-fold-core ob-eval org-keys oc org-compat
org-version org-macs format-spec ede/srecode srecode semantic/db
semantic/util-modes semantic/util semantic pp semantic/tag semantic/lex
semantic/fw mode-local ede/speedbar ede/files ede ede/detect ede/base
ede/source eieio-speedbar speedbar ezimage dframe eieio-custom cedet
term disp-table shell pcomplete ehelp cc-langs spinner cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
arduino-mode-autoloads ede/auto eieio-base spinner-autoloads
markdown-mode apib-mode-autoloads color thingatpt noutline outline
markdown-mode-autoloads amx-autoloads all-the-icons
all-the-icons-dired-autoloads aggressive-indent-autoloads vc-svn
find-dired dash ag-autoloads info dash-autoloads s
add-node-modules-path-autoloads s-autoloads finder find-func
package-lint-autoloads reformatter-autoloads all-the-icons-faces
data-material data-weathericons data-octicons data-fileicons
data-faicons data-alltheicons compile comint ansi-osc ansi-color
all-the-icons-autoloads loaddefs-gen lisp-mnt radix-tree tar-mode
arc-mode archive-mode finder-inf mm-archive message sendmail yank-media
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
gnus-util text-property-search mailabbrev gmm-utils mailheader mm-decode
mm-bodies mm-encode mail-utils gnutls network-stream url-cache url-http
url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-gw nsm puny epg-config winner ring which-func imenu
server savehist saveplace recentf tree-widget wid-edit package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers
url-parse auth-source eieio eieio-core password-cache json url-vars
mb-depth ido help-at-pt so-long hl-line autorevert icomplete desktop
frameset delsel use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core map byte-opt let-alist filenotify cus-load time-date
comp comp-cstr warnings icons subr-x rx cl-seq cl-macs cl-extra
help-mode bytecomp byte-compile gv pcase bootstrap-theme cl-loaddefs
cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win 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 xwidget-internal kqueue cocoa
ns lcms2 multi-tty make-network-process native-compile emacs)
Memory information:
((conses 16 2754798 929244)
(symbols 48 129069 796)
(strings 32 514353 275062)
(string-bytes 1 15792171)
(vectors 16 254829)
(vector-slots 8 6368133 1332292)
(floats 8 1804 6041)
(intervals 56 16202 12601)
(buffers 984 117))
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
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
0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-05-08 10:36 UTC (permalink / raw)
To: Jimmy Yuen Ho Wong; +Cc: 63338
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
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:
[-- Attachment #2: Type: text/plain, Size: 637 bytes --]
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index bbe2b8bb4af..988b92da75b 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1992,7 +1992,7 @@ package--find-non-dependencies
(defun package--save-selected-packages (&optional value)
"Set and save `package-selected-packages' to VALUE."
(when value
- (setq package-selected-packages value))
+ (setq package-selected-packages (delete-dups value)))
(if after-init-time
(customize-save-variable 'package-selected-packages package-selected-packages)
(add-hook 'after-init-hook #'package--save-selected-packages)))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
2023-05-08 10:36 ` Philip Kaludercic
@ 2023-05-08 12:04 ` Eli Zaretskii
2023-05-09 2:56 ` Jimmy Wong
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-05-08 12:04 UTC (permalink / raw)
To: Philip Kaludercic; +Cc: wyuenho, 63338
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
2023-05-08 12:04 ` Eli Zaretskii
@ 2023-05-09 2:56 ` Jimmy Wong
2023-05-10 6:56 ` Philip Kaludercic
0 siblings, 1 reply; 8+ messages in thread
From: Jimmy Wong @ 2023-05-09 2:56 UTC (permalink / raw)
To: Philip Kaludercic, Eli Zaretskii; +Cc: 63338
[-- 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 --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
2023-05-09 2:56 ` Jimmy Wong
@ 2023-05-10 6:56 ` Philip Kaludercic
2023-05-13 17:18 ` Philip Kaludercic
0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-05-10 6:56 UTC (permalink / raw)
To: Jimmy Wong; +Cc: Eli Zaretskii, 63338
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
Jimmy Wong <wyuenho@gmail.com> writes:
> 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?
The issue is that we want to go through package--save-selected-packages,
that is given a new value to assign to `package-selected-packages'.
An otherwise, I my understanding is that add-to-list is not conventional
in executed code.
The alternative is to check for duplicates before invoking the function:
[-- Attachment #2: Type: text/plain, Size: 727 bytes --]
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index e9794eac783..b967aaa3d4d 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -507,9 +507,10 @@ package-vc--unpack-1
(package--reload-previously-loaded new-desc)))
;; Mark package as selected
- (package--save-selected-packages
- (cons (package-desc-name pkg-desc)
- package-selected-packages))
+ (let ((name (package-desc-name pkg-desc)))
+ (unless (memq name package-selected-packages)
+ (package--save-selected-packages
+ (cons name package-selected-packages))))
(package--quickstart-maybe-refresh)
;; Confirm that the installation was successful
[-- Attachment #3: Type: text/plain, Size: 913 bytes --]
> 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.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
2023-05-10 6:56 ` Philip Kaludercic
@ 2023-05-13 17:18 ` Philip Kaludercic
2023-05-14 12:51 ` Jimmy Wong
0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-05-13 17:18 UTC (permalink / raw)
To: Jimmy Wong; +Cc: Eli Zaretskii, 63338
ping?
Philip Kaludercic <philipk@posteo.net> writes:
> Jimmy Wong <wyuenho@gmail.com> writes:
>
>> 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?
>
> The issue is that we want to go through package--save-selected-packages,
> that is given a new value to assign to `package-selected-packages'.
> An otherwise, I my understanding is that add-to-list is not conventional
> in executed code.
>
> The alternative is to check for duplicates before invoking the function:
>
> diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
> index e9794eac783..b967aaa3d4d 100644
> --- a/lisp/emacs-lisp/package-vc.el
> +++ b/lisp/emacs-lisp/package-vc.el
> @@ -507,9 +507,10 @@ package-vc--unpack-1
> (package--reload-previously-loaded new-desc)))
>
> ;; Mark package as selected
> - (package--save-selected-packages
> - (cons (package-desc-name pkg-desc)
> - package-selected-packages))
> + (let ((name (package-desc-name pkg-desc)))
> + (unless (memq name package-selected-packages)
> + (package--save-selected-packages
> + (cons name package-selected-packages))))
> (package--quickstart-maybe-refresh)
>
> ;; Confirm that the installation was successful
>
>
>
>> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
2023-05-13 17:18 ` Philip Kaludercic
@ 2023-05-14 12:51 ` Jimmy Wong
2023-05-16 19:31 ` Philip Kaludercic
0 siblings, 1 reply; 8+ messages in thread
From: Jimmy Wong @ 2023-05-14 12:51 UTC (permalink / raw)
To: Philip Kaludercic; +Cc: Eli Zaretskii, 63338
[-- Attachment #1: Type: text/plain, Size: 2702 bytes --]
This is acceptable to me
On 13 May 2023 at 6:18 PM +0100, Philip Kaludercic <philipk@posteo.net>, wrote:
> ping?
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
> > Jimmy Wong <wyuenho@gmail.com> writes:
> >
> > > 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?
> >
> > The issue is that we want to go through package--save-selected-packages,
> > that is given a new value to assign to `package-selected-packages'.
> > An otherwise, I my understanding is that add-to-list is not conventional
> > in executed code.
> >
> > The alternative is to check for duplicates before invoking the function:
> >
> > diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
> > index e9794eac783..b967aaa3d4d 100644
> > --- a/lisp/emacs-lisp/package-vc.el
> > +++ b/lisp/emacs-lisp/package-vc.el
> > @@ -507,9 +507,10 @@ package-vc--unpack-1
> > (package--reload-previously-loaded new-desc)))
> >
> > ;; Mark package as selected
> > - (package--save-selected-packages
> > - (cons (package-desc-name pkg-desc)
> > - package-selected-packages))
> > + (let ((name (package-desc-name pkg-desc)))
> > + (unless (memq name package-selected-packages)
> > + (package--save-selected-packages
> > + (cons name package-selected-packages))))
> > (package--quickstart-maybe-refresh)
> >
> > ;; Confirm that the installation was successful
> >
> >
> >
> > > 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: 3317 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#63338: 29.0.90; package-vc-install'ing the same package multiple times results in duplication in package-selected-packages
2023-05-14 12:51 ` Jimmy Wong
@ 2023-05-16 19:31 ` Philip Kaludercic
0 siblings, 0 replies; 8+ messages in thread
From: Philip Kaludercic @ 2023-05-16 19:31 UTC (permalink / raw)
To: Jimmy Wong; +Cc: Eli Zaretskii, 63338-done
Jimmy Wong <wyuenho@gmail.com> writes:
> This is acceptable to me
OK, I a change like this to emacs-29. Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-05-16 19:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).