* bug#76065: 31.0.50; When package is installed with 'package-vc-install' it has default summary
@ 2025-02-04 18:27 Przemyslaw Kryger
0 siblings, 0 replies; only message in thread
From: Przemyslaw Kryger @ 2025-02-04 18:27 UTC (permalink / raw)
To: 76065
[-- Attachment #1: Type: text/plain, Size: 2300 bytes --]
On a freshly installed Emacs (no user configuration whatsoever):
1. 'emacs -Q'
2. Install a package providing package name and spec by evaling the
followinw in '*scratch*' (using 'ace-window' for the sake of arguments):
(package-vc-install (cons 'ace-window
(list
:url "https://github.com/abo-abo/ace-window.git")))
3. Eval the following to get the package summary:
(package-desc-summary
(cadr (assq 'ace-window package-alist)))
;; "No description available."
4. Eval the following to get the contents of generated
'ace-window-pkg.el' file:
(with-temp-buffer
(insert-file-contents
(expand-file-name "ace-window-pkg.el"
(package-desc-dir
(cadr (assq 'ace-window package-alist)))))
(goto-char (point-min))
(read (current-buffer)))
;; (define-package "ace-window" "0.10.0" "No description available." '((avy "0.5.0")) :kind vc :commit "77115afc1b0b9f633084cf7479c767988106c196")
The function 'package-vc-install-from-checkout' is affected as well,
again starting with a freshly installed Emacs with no configuration:
1. 'cd ~'
2. 'git clone https://github.com/abo-abo/ace-window.git'
3. 'emacs -Q'
4. Eval the following
(package-vc-install-from-checkout "~/ace-window" "ace-window")
5. Eval the following to get the package summary:
(package-desc-summary
(cadr (assq 'ace-window package-alist)))
;; "No description available."
5. Eval the following to get the contents of generated
'ace-window-pkg.el' file:
(with-temp-buffer
(insert-file-contents
(expand-file-name "ace-window-pkg.el"
"~"))
(goto-char (point-min))
(read (current-buffer)))
;; (define-package "ace-window" "0.10.0" "No description available." '((avy "0.5.0")) :kind vc :commit "77115afc1b0b9f633084cf7479c767988106c196")
I can reproduce the same behaviour on Emacs 29.4 Mac port as well.
I think the issue stems from how function
'package-vc--generate-description-file' detects that it needs to
generate a new description (as opposed to re-using the one in passed
argument PGK-DESC). I have applied the attached patch and after
installing the package (either with 'package-vc-install' or with
'package-vc-install-from-checkout') I can see description being properly
generated.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-summary-in-packages-installed-with-package-vc-fu.patch --]
[-- Type: text/x-patch, Size: 1661 bytes --]
From af4a5cf3ef576d2acf5efc53dd563664c3c23869 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Przemys=C5=82aw=20Kryger?= <pkryger@gmail.com>
Date: Tue, 4 Feb 2025 18:18:06 +0000
Subject: [PATCH] Fix summary in packages installed with package-vc functions
* emacs-list/package-vc.el: (package-vc--generate-description-file): Use
`package--default-summary` to determine when a summary for a newly
installed package should be generated.
---
lisp/emacs-lisp/package-vc.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index a18841fb64d..ec8418faf69 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -272,10 +272,14 @@ asynchronously."
"Generate a package description file for PKG-DESC and write it to PKG-FILE."
(let ((name (package-desc-name pkg-desc)))
;; Infer the subject if missing.
- (unless (package-desc-summary pkg-desc)
+ (when (or (null (package-desc-summary pkg-desc))
+ (equal (package-desc-summary pkg-desc)
+ package--default-summary))
(setf (package-desc-summary pkg-desc)
(let ((main-file (package-vc--main-file pkg-desc)))
- (or (package-desc-summary pkg-desc)
+ (or (and-let* ((summary (package-desc-summary pkg-desc))
+ ((not (equal summary package--default-summary))))
+ summary)
(and-let* ((pkg (cadr (assq name package-archive-contents))))
(package-desc-summary pkg))
(and main-file (file-exists-p main-file)
--
2.47.1
[-- Attachment #3: Type: text/plain, Size: 3067 bytes --]
Emacs didn't crash.
In GNU Emacs 31.0.50 (build 1, aarch64-unknown-linux-gnu)
System Description: Debian GNU/Linux 12 (bookworm)
Configured using:
'configure
--prefix=/nix/store/4jhcb89gfm6if89074lcha3zb04gibgx-emacs-snapshot
--disable-build-details --with-modules --with-x=no --with-ns=no
--with-xpm=no --with-jpeg=no --with-png=no --with-gif=no
--with-tiff=no'
Configured features:
GMP GNUTLS LIBXML2 MODULES NOTIFY INOTIFY PDUMPER SECCOMP SOUND SQLITE3
THREADS TREE_SITTER
Important settings:
locale-coding-system: nil
Major mode: Lisp Interaction
Minor modes in effect:
xterm-mouse-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-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:
(cus-edit cus-start cus-load wid-edit rfc2104 cl-extra gnutls
network-stream nsm mailalias smtpmail textsec uni-scripts url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util url-parse auth-source cl-seq
eieio eieio-core cl-macs icons json map url-vars idna-mapping
ucs-normalize uni-confusable textsec-check thingatpt ispell rx help-mode
tool-bar pp shadow regexp-opt sort mail-extr emacsbug message mailcap
yank-media puny dired dnd dired-loaddefs rfc822 mml mml-sec
password-cache epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date subr-x mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
xt-mouse term/xterm xterm byte-opt gv bytecomp byte-compile disp-table
rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select 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 inotify multi-tty
make-network-process tty-child-frames emacs)
Memory information:
((conses 16 200474 35320) (symbols 48 9592 2) (strings 32 37755 1150)
(string-bytes 1 686599) (vectors 16 35572)
(vector-slots 8 415602 35621) (floats 8 46 280) (intervals 56 455 24)
(buffers 992 14))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-04 18:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 18:27 bug#76065: 31.0.50; When package is installed with 'package-vc-install' it has default summary Przemyslaw Kryger
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).