update packages

This commit is contained in:
2025-11-25 19:52:03 +01:00
parent 14ba373378
commit dbbae92267
280 changed files with 13451 additions and 11207 deletions

View File

@@ -65,7 +65,14 @@ Argument ERROR-FILE is the file where errors are logged, if some."
(action-string (pcase action
('install "Installing")
('upgrade "Upgrading")
('reinstall "Reinstalling"))))
('reinstall "Reinstalling")))
;; As PACKAGES are installed and compiled in a single async
;; process we don't need to compute log-file in child process
;; i.e. we use the same log-file for all PACKAGES.
(log-file (make-temp-file
(expand-file-name
(file-name-nondirectory async-byte-compile-log-file)
temporary-file-directory))))
(message "%s %s package(s)..." action-string (length packages))
(process-put
(async-start
@@ -92,13 +99,12 @@ Argument ERROR-FILE is the file where errors are logged, if some."
(format
"%S:\n Please refresh package list before %s"
err ,action-string)))))
(let (error-data)
(when (get-buffer byte-compile-log-buffer)
(setq error-data (with-current-buffer byte-compile-log-buffer
(buffer-substring-no-properties
(point-min) (point-max))))
(when (get-buffer byte-compile-log-buffer)
(let ((error-data (with-current-buffer byte-compile-log-buffer
(buffer-substring-no-properties
(point-min) (point-max)))))
(unless (string= error-data "")
(with-temp-file ,async-byte-compile-log-file
(with-temp-file ,log-file
(erase-buffer)
(insert error-data)))))))
(lambda (result)
@@ -127,15 +133,9 @@ Argument ERROR-FILE is the file where errors are logged, if some."
'async-package-message
str (length lst)))
packages action-string)
(when (file-exists-p async-byte-compile-log-file)
(let ((buf (get-buffer-create byte-compile-log-buffer)))
(with-current-buffer buf
(goto-char (point-max))
(let ((inhibit-read-only t))
(insert-file-contents async-byte-compile-log-file)
(compilation-mode))
(display-buffer buf)
(delete-file async-byte-compile-log-file)))))))
(if (zerop (nth 7 (file-attributes log-file)))
(delete-file log-file)
(async-bytecomp--file-to-comp-buffer-1 log-file)))))
(run-hooks 'async-pkg-install-after-hook)))
'async-pkg-install t)
(async-package--modeline-mode 1)))