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#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Fri, 12 May 2023 06:51:19 +0000 Message-ID: <875y8yxct4.fsf@posteo.net> References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> <87lehwfzli.fsf@posteo.net> <87a5ybsjum.fsf@breatheoutbreathe.in> 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="37156"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63337@debbugs.gnu.org, Eli Zaretskii To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 12 08:52:14 2023 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 1pxMdR-0009Pm-W6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 May 2023 08:52:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxMdJ-0004E2-DX; Fri, 12 May 2023 02:52:05 -0400 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 1pxMdG-0004Dp-4g for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 02:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxMdF-0007sF-Og for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 02:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxMdF-0007m5-In for bug-gnu-emacs@gnu.org; Fri, 12 May 2023 02:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 May 2023 06:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63337 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63337-submit@debbugs.gnu.org id=B63337.168387428829845 (code B ref 63337); Fri, 12 May 2023 06:52:01 +0000 Original-Received: (at 63337) by debbugs.gnu.org; 12 May 2023 06:51:28 +0000 Original-Received: from localhost ([127.0.0.1]:53871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMci-0007lJ-6W for submit@debbugs.gnu.org; Fri, 12 May 2023 02:51:28 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:41399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMcg-0007l2-FQ for 63337@debbugs.gnu.org; Fri, 12 May 2023 02:51:27 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BF3B7240233 for <63337@debbugs.gnu.org>; Fri, 12 May 2023 08:51:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683874280; bh=V3A5IrsNpO7Rui2+HMUG08rC7mtsiLwGosRAUMKDvjE=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=NWQK/Q4nGRCfIhsSc+jjOZms59FoaoOduNjhm1NV4DTqDyMo6jF/hnsDzGp8RWtdX qZXrf4VZ1FORkSjPmbtp5HMbz79oT5LP7SJACZytC+rWpnBuUDGd4x8Qc0RSUkmdCT DsDWI9ZCZ3hVDJwqlVtRCE7Eq8f1m9lopJrzvAhS7FhXHIzhY4KhJ2HU/q+0ydc6t+ uJY3fTpVo+YLaoIt66ua4Uc2SPZS0MyzNxWE0KtqHA2diUvMCcjAVq2kQ18C+HVkEd +/EUHvF/UrjhmtTV3D48IpJzVVt/yo7r6XeSybPtE/gxuCsvA8m77OureJ8cSBHACT cc1e1iT9Rp/mw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QHfYh0tjsz6txJ; Fri, 12 May 2023 08:51:20 +0200 (CEST) In-Reply-To: <87a5ybsjum.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Wed, 10 May 2023 19:04:02 -0700") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM 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:261606 Archived-At: --=-=-= Content-Type: text/plain Joseph Turner writes: > Philip Kaludercic writes: > >> Ok, do you have a few example repositories that we can use to test edge-cases? > > I first noticed this issue when attempting to build the docs for > org-transclusion. Besides that, we could select a few package specs > containing :make at random from > https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/elpa-packages ? One issue I still notice in this case is that if the file doesn't exist, the issue is raised by `insert-file-contents' which aborts the entire installation. Does checking the existence of the file, and continuing on if this is not the case make sense: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index e9794eac783..1c1492d87b2 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -353,28 +353,30 @@ package-vc--build-documentation (default-directory (file-name-directory file-name)) (output (expand-file-name (format "%s.info" pkg-name))) clean-up) - (when (string-match-p "\\.org\\'" file) - (require 'ox) - (require 'ox-texinfo) - (with-temp-buffer - (insert-file-contents file-name) - (setq file (make-temp-file "ox-texinfo-")) - (org-export-to-file 'texinfo file) - (setq clean-up t))) - (with-current-buffer (get-buffer-create " *package-vc doc*") - (erase-buffer) - (cond - ((/= 0 (call-process "makeinfo" nil t nil - "--no-split" file "-o" output)) - (message "Failed to build manual %s, see buffer %S" - file (buffer-name))) - ((/= 0 (call-process "install-info" nil t nil - output (expand-file-name "dir"))) - (message "Failed to install manual %s, see buffer %S" - output (buffer-name))) - ((kill-buffer)))) - (when clean-up - (delete-file file)))) + (if (not (file-exists-p file-name)) + (message "Documentation file %S for %s not found" file pkg-name) + (when (string-match-p "\\.org\\'" file) + (require 'ox) + (require 'ox-texinfo) + (with-temp-buffer + (insert-file-contents file-name) + (setq file (make-temp-file "ox-texinfo-")) + (org-export-to-file 'texinfo file) + (setq clean-up t))) + (with-current-buffer (get-buffer-create " *package-vc doc*") + (erase-buffer) + (cond + ((/= 0 (call-process "makeinfo" nil t nil + "--no-split" file "-o" output)) + (message "Failed to build manual %s, see buffer %S" + file (buffer-name))) + ((/= 0 (call-process "install-info" nil t nil + output (expand-file-name "dir"))) + (message "Failed to install manual %s, see buffer %S" + output (buffer-name))) + ((kill-buffer)))) + (when clean-up + (delete-file file))))) (defun package-vc-install-dependencies (requirements) "Install missing dependencies, and return missing ones. --=-=-= Content-Type: text/plain > Joseph --=-=-=--