GNU bug report logs -
#63337
[PATCH] package-vc--build-documentation: Fix relative @include statements
Previous Next
Reported by: Joseph Turner <joseph <at> breatheoutbreathe.in>
Date: Sat, 6 May 2023 21:53:01 UTC
Severity: normal
Tags: patch
Fixed in version 29.1
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Joseph Turner <joseph <at> breatheoutbreathe.in> writes:
> Philip Kaludercic <philipk <at> posteo.net> 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:
[Message part 2 (text/plain, 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.
[Message part 3 (text/plain, inline)]
> Joseph
This bug report was last modified 2 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.