From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65649: [PATCH] package-vc: Continue installing package when documentation build fails Date: Wed, 30 Aug 2023 23:32:42 -0700 Message-ID: <87r0njvhyo.fsf@breatheoutbreathe.in> References: <87v8cvvi6r.fsf@breatheoutbreathe.in> Reply-To: Joseph Turner 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="24893"; mail-complaints-to="usenet@ciao.gmane.io" To: 65649@debbugs.gnu.org, philipk@posteo.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 31 08:35:11 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 1qbbGo-0006Dp-7W for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 31 Aug 2023 08:35:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbbGc-0000qI-5E; Thu, 31 Aug 2023 02:34:58 -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 1qbbGY-0000q5-Az for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:34:54 -0400 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 1qbbGX-00022t-Qy for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:34:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbbGf-000413-PR for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Aug 2023 06:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65649 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, Philip Kaludercic Original-Received: via spool by submit@debbugs.gnu.org id=B.169346365915386 (code B ref -1); Thu, 31 Aug 2023 06:35:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Aug 2023 06:34:19 +0000 Original-Received: from localhost ([127.0.0.1]:54684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbbFy-000405-Ot for submit@debbugs.gnu.org; Thu, 31 Aug 2023 02:34:19 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:42690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbbFu-0003zq-3f for submit@debbugs.gnu.org; Thu, 31 Aug 2023 02:34:17 -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 1qbbFg-0000mY-Js for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:34:00 -0400 Original-Received: from out-244.mta0.migadu.com ([2001:41d0:1004:224b::f4]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbbFe-0001xA-1r for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:34:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1693463635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=J7pEvZMFg0SHjX/bOXopgt6Dzt3jyXkR4S2VyETb5QA=; b=U5OXhOwC8rIe7isN/oUu2NDzc8TTu7zlqBiU4VKcknq2et+B4CIpZEOhlkE+eVMGj4ujf5 jWS7JWg6jxyyxkyyxxQvtwcfW3VY5G/iI4WF7YYoMDc943stKMu9+GHLEnCjeF1z3oP/kZ CYIqSv8mtue+1Fw3/mGAYgnjDONr89s= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <87v8cvvi6r.fsf@breatheoutbreathe.in> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::f4; envelope-from=joseph@breatheoutbreathe.in; helo=out-244.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:268782 Archived-At: --=-=-= Content-Type: text/plain Oops, the format string should be %S, not %s. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Continue-installing-package-when-documentation-build.patch >From 83c62d80b5199cee911e30c1f3bb03c5a585b689 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Wed, 30 Aug 2023 23:24:16 -0700 Subject: [PATCH] Continue installing package when documentation building fails * lisp/emacs-lisp/package-vc.el (package-vc--build-documentation): Demote errors to messages. --- lisp/emacs-lisp/package-vc.el | 61 ++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 747fe696204..bc1200c583f 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -409,36 +409,37 @@ prepared." "Build documentation for package PKG-DESC from documentation source in FILE. FILE can be an Org file, indicated by its \".org\" extension, otherwise it's assumed to be an Info file." - (let* ((pkg-name (package-desc-name pkg-desc)) - (default-directory (package-desc-dir pkg-desc)) - (docs-directory (file-name-directory (expand-file-name file))) - (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) - (setq file (make-temp-file "ox-texinfo-")) - (let ((default-directory docs-directory)) - (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 - "-I" docs-directory - "--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)))) + (with-demoted-errors "package-vc: Could not build documentation: %S" + (let* ((pkg-name (package-desc-name pkg-desc)) + (default-directory (package-desc-dir pkg-desc)) + (docs-directory (file-name-directory (expand-file-name file))) + (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) + (setq file (make-temp-file "ox-texinfo-")) + (let ((default-directory docs-directory)) + (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 + "-I" docs-directory + "--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 (deps) "Install missing dependencies according to DEPS. -- 2.41.0 --=-=-=--