From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Steven Allen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69019: [PATCH] package-vc: scan the correct directory for lisp files Date: Sat, 10 Feb 2024 10:51:36 -0800 Message-ID: <87ttmgp2yv.fsf@stebalien.com> Reply-To: Steven Allen 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="25448"; mail-complaints-to="usenet@ciao.gmane.io" To: 69019@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 10 19:53:26 2024 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 1rYsTc-0006L3-Mv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Feb 2024 19:53:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYsT2-0002Hf-BX; Sat, 10 Feb 2024 13:52:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYsT0-0002HH-Ne for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 13:52:47 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rYsT0-0002H9-F9 for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 13:52:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rYsTG-0003b1-6q for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 13:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Steven Allen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Feb 2024 18:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69019 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170759113013682 (code B ref -1); Sat, 10 Feb 2024 18:53:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Feb 2024 18:52:10 +0000 Original-Received: from localhost ([127.0.0.1]:33236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYsSQ-0003Yb-1C for submit@debbugs.gnu.org; Sat, 10 Feb 2024 13:52:10 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:41452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYsSM-0003Xu-OJ for submit@debbugs.gnu.org; Sat, 10 Feb 2024 13:52:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYsS1-00026J-Ej for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 13:51:45 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYsRz-00027T-6e for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 13:51:45 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BC88B5C00A2 for ; Sat, 10 Feb 2024 13:51:38 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 10 Feb 2024 13:51:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stebalien.com; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1707591098; x=1707677498; bh=TBh6/s5Ye42xXY9inHK3rjFtgQHPyEvd fx672KecAJM=; b=jzvixFK65hLJy2WN3FAyXUN61MNXUGSbbuOHvIemdSz3P9ki Pywg8Dufe5fTbj+OTQFtrFnfkeo6WioW8g6g9pOShxVzVieOeRwHY/eP9yA9yXNy 4YFEpqs9JS5nGka8Id6IiyqTQnA4kLCB9cfpPye9VbiNbTFlRgjamiS86LaPEMxC pmRsQDd+bG0HOZ60TUIRN+5r8uLV9aKuBO6/3MrBpSHfJTfQy8BhL3FxhIByzfJe IJDZjjTYTwpfmRa+1Tk8qGYF4Ao5INyFYBd28GjtmYRMkBJtWGPVmtmxydVD/q9a ISlVenylfc/2TdWRlJ0/97WDlmLgtXPTtbXzrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1707591098; x=1707677498; bh=TBh6/s5Ye42xXY9inHK3rjFtgQHPyEvdfx6 72KecAJM=; b=EVrceIomAgMpzLnjL79grJGC2jtwxGQTT38hQAxZOIcoalMDR3t D8Rc7GjFgsIMrAfeLmIjyl0lRfVPCD/8b62zbPpxVeQQC2po3sx4LJJGXf4Miui7 DiXtsRQGUyNNLLGNDM3YeEldt+G+eJNsgz2Z7ZZfspIiMEh4EcigOzdtQlAg2Bhw g9Af2hys6Iz8acr21SQowpupEPs+PuQThuFOOv5LF5U1dlm5RoR5Vfj01d6dGBVg tK4xWLkacdvIqWasy4s4/UtFaGsgeI/484Ew7V/5rRuxf/08c7jaRUh74GWHLtL9 o6htdT2xJtog6jSuhKwuU6YVcGRoNhFe4MA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrtdelgdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgesmhdtreertddttd enucfhrhhomhepufhtvghvvghnucetlhhlvghnuceoshhtvghvvghnsehsthgvsggrlhhi vghnrdgtohhmqeenucggtffrrghtthgvrhhnpeekffffgfevteehtdeiffelffegkedvie eigeehfedtteejkeefhfevtddtkeefffenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehsthgvvhgvnhesshhtvggsrghlihgvnhdrtghomh X-ME-Proxy: Feedback-ID: ie8a146a7:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 10 Feb 2024 13:51:38 -0500 (EST) Received-SPF: pass client-ip=66.111.4.27; envelope-from=steven@stebalien.com; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279783 Archived-At: --=-=-= Content-Type: text/plain Following up on my previous patch (Bug#68761), we need to scan for package requirements inside the lisp-dir (if set), not in the root package directory. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-package-vc-scan-the-correct-directory-for-lisp-files.patch >From 5a4540756e5e30d12010ce58094aafacc1b8fe01 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 10 Feb 2024 10:05:11 -0800 Subject: [PATCH] package-vc: scan the correct directory for lisp files Otherwise, we won't correctly detect package requirements. * lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Scan 'lisp-dir', if set, for lisp files instead of scanning the root package directory. --- lisp/emacs-lisp/package-vc.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index fc402716dab..2730100b3d0 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -501,8 +501,9 @@ package-vc--unpack-1 autoloads, generating a package description file (used to identify a package as a VC package later on), building documentation and marking the package as installed." - (let ((pkg-spec (package-vc--desc->spec pkg-desc)) - missing) + (let* ((pkg-spec (package-vc--desc->spec pkg-desc)) + (lisp-dir (plist-get pkg-spec :lisp-dir)) + missing) ;; In case the package was installed directly from source, the ;; dependency list wasn't know beforehand, and they might have @@ -519,7 +520,7 @@ package-vc--unpack-1 "\\|") regexp-unmatchable)) (deps '())) - (dolist (file (directory-files pkg-dir t "\\.el\\'" t)) + (dolist (file (directory-files (file-name-concat pkg-dir lisp-dir) t "\\.el\\'" t)) (unless (string-match-p ignored-files file) (with-temp-buffer (insert-file-contents file) @@ -542,8 +543,7 @@ package-vc--unpack-1 (pkg-file (expand-file-name (package--description-file pkg-dir) pkg-dir))) ;; Generate autoloads (let* ((name (package-desc-name pkg-desc)) - (auto-name (format "%s-autoloads.el" name)) - (lisp-dir (plist-get pkg-spec :lisp-dir))) + (auto-name (format "%s-autoloads.el" name))) (package-generate-autoloads name (file-name-concat pkg-dir lisp-dir)) (when lisp-dir -- 2.43.0 --=-=-=--