GNU bug report logs -
#53805
27.2; NonGNU ELPA: helm does not install dependencies
Previous Next
Reported by: Xingyu Pu <pu.stshine <at> gmail.com>
Date: Sat, 5 Feb 2022 17:10:01 UTC
Severity: normal
Found in version 27.2
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 53805 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Xingyu Pu <pu.stshine <at> gmail.com> writes:
> When installing helm from the NonGNU ELPA, packages that helm requires
> is not installed.
>
> Step to reproduce:
>
> Add nongnu repository to package-archives.
> List packages by M-x list-packages.
> Select helm from nongnu and install.
> Package helm-core, async, popup that helm requires is not installed.
It seems to me that the core of the issue is that the ELPA build system
overrides the existing -pkg.el files, by trying to infer all the package
metadata from the main files (helm.el, helm-core.el). If as in the case
of helm and helm-core these are empty, this leads to unexpected results.
This patch seems to fix the issue on my end:
[Message part 2 (text/plain, inline)]
diff --git a/elpa-admin.el b/elpa-admin.el
index d570c3c6aa..6714cd07a4 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1015,14 +1015,25 @@ EXTRAS is an alist with additional metadata.
PKG is the name of the package and DIR is the directory where it is."
(let* ((pkg (car pkg-spec))
(mainfile (expand-file-name (elpaa--main-file pkg-spec) dir))
+ (desc-file (expand-file-name (concat pkg "-pkg.el") dir))
(files (directory-files dir nil "\\`dir\\'\\|\\.el\\'")))
(setq files (delete (concat pkg "-pkg.el") files))
(setq files (delete (concat pkg "-autoloads.el") files))
(cond
+ ((file-exists-p desc-file)
+ (with-temp-buffer
+ (insert-file-contents desc-file)
+ (let* ((form (read (current-buffer)))
+ (pkg-desc (apply #'package-desc-from-define (cdr form))))
+ (list (= (length files) 1)
+ (package-version-join (package-desc-version pkg-desc))
+ (package-desc-summary pkg-desc)
+ (package-desc-reqs pkg-desc)
+ nil))))
((file-exists-p mainfile)
(with-temp-buffer
- (insert-file-contents mainfile)
- (goto-char (point-min))
+ (insert-file-contents mainfile)
+ (goto-char (point-min))
(let* ((pkg-desc
(unwind-protect
(progn
[Message part 3 (text/plain, inline)]
But it hasn't been thoroughly tested.
Another possibility I don't want to exclude is that I messed up the
package specification when adding the packages to the archive.
--
Philip Kaludercic
This bug report was last modified 3 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.