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:34:29 -0700 Message-ID: <87msy7vhum.fsf@breatheoutbreathe.in> References: <87v8cvvi6r.fsf@breatheoutbreathe.in> <87r0njvhyo.fsf@breatheoutbreathe.in> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36069"; 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:37:13 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 1qbbIk-00097H-NA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 31 Aug 2023 08:37:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbbIb-000197-Sj; Thu, 31 Aug 2023 02:37:01 -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 1qbbIV-00018o-Li for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:36:55 -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 1qbbIU-0002aI-Dn for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:36:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbbIc-00044M-4F for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:37:02 -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:37:02 +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.169346380515620 (code B ref -1); Thu, 31 Aug 2023 06:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Aug 2023 06:36:45 +0000 Original-Received: from localhost ([127.0.0.1]:54694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbbIL-00043s-7Y for submit@debbugs.gnu.org; Thu, 31 Aug 2023 02:36:45 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:46798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbbII-00043d-V6 for submit@debbugs.gnu.org; Thu, 31 Aug 2023 02:36:43 -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 1qbbI4-00010u-O8 for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:36:28 -0400 Original-Received: from out-248.mta0.migadu.com ([91.218.175.248]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbbI2-0002Wt-2K for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 02:36:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1693463783; 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=mcAf8GwcyQ7VVjQcZrAD7ukrARPNhyaLSUpzujIN/w4=; b=eV14KKjP4B447wrE+3kgGamCAVrYeEeGMn0KV3H9d7e0pXkWb/R9Z2mvS4+rL67Bbz6F/m UMt3Py8fOZQu/5/ebH222wl3w8jo+/sJ1maDXl/fg7u65OTQ/0+zcnr1imFiTgu0oTuYbr POHRDkQ4pH+XOB+Jdf6s94eI59V7bmc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <87r0njvhyo.fsf@breatheoutbreathe.in> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.248; envelope-from=joseph@breatheoutbreathe.in; helo=out-248.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, RCVD_IN_MSPIKE_H2=-0.001, 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:268783 Archived-At: It would be nice to report more information about the package with failed documentation, but AFAICT with-demoted-errors does not allow its FORMAT string to be a symbol whose value is a string. Joseph Turner writes: > Oops, the format string should be %S, not %s. > > [2. text/x-diff; 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.