From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#53805: 27.2; NonGNU ELPA: helm does not install dependencies Date: Sat, 05 Feb 2022 19:08:50 +0000 Message-ID: <8735kx3zct.fsf@posteo.net> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33559"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 53805@debbugs.gnu.org To: Xingyu Pu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 05 20:11:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nGQSk-0008cA-E0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Feb 2022 20:11:10 +0100 Original-Received: from localhost ([::1]:40010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGQSi-0000hu-PQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Feb 2022 14:11:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGQRe-0000gU-2l for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2022 14:10:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGQRd-0001fD-PL for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2022 14:10:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nGQRd-0004ri-LH for bug-gnu-emacs@gnu.org; Sat, 05 Feb 2022 14:10:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Feb 2022 19:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53805 X-GNU-PR-Package: emacs Original-Received: via spool by 53805-submit@debbugs.gnu.org id=B53805.164408814618632 (code B ref 53805); Sat, 05 Feb 2022 19:10:01 +0000 Original-Received: (at 53805) by debbugs.gnu.org; 5 Feb 2022 19:09:06 +0000 Original-Received: from localhost ([127.0.0.1]:35618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGQQk-0004qR-0u for submit@debbugs.gnu.org; Sat, 05 Feb 2022 14:09:06 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:50379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGQQh-0004pt-Nc for 53805@debbugs.gnu.org; Sat, 05 Feb 2022 14:09:04 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 46289240106 for <53805@debbugs.gnu.org>; Sat, 5 Feb 2022 20:08:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1644088137; bh=Kavs811o9ZFQpQt4sj9vKvZX10zSrLzZM+4nyw+w2Js=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=oGgnex1bE/4VMH8TZyP0O851PWicrz4cgchwDHYEJFOc1QJgNTdQVgc87gPfrWRmT rYkS7U4rtGbADLd6s6UsdF11dYHQQUiap75iDQPPDLFNme/xO8fi49kT1tAVDfr4pE SCcrxIYCx0muYhytBMwuzsPNObxHYG2M6C1zTQq1KSrrGELjdFcrwdOecx18jJVVJk g1p6ZOAIU044RbMJWB2IqITJse9lZ5QwF5gurEjHLWlNrOxTmJJ579pbqL17WFXadu IQUjS+4G++hngEoC9DLikjhOIaQxbwiS0BwYD7/5AWdUd6JeObqqB5E+YIXHXcTomh 3ISkSeLsmJ3jg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JrhlX0JkTz6tmB; Sat, 5 Feb 2022 20:08:55 +0100 (CET) Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB In-Reply-To: (Xingyu Pu's message of "Sat, 5 Feb 2022 22:52:49 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226088 Archived-At: --=-=-= Content-Type: text/plain Xingyu Pu 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: --=-=-= Content-Type: text/plain Content-Disposition: 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 --=-=-= Content-Type: text/plain 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 --=-=-=--