unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64242: [PATCH] Fix VC package build when there is no docs dir
@ 2023-06-23  5:45 Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-06-23  6:02 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-23  5:45 UTC (permalink / raw)
  To: 64242

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

Tags: patch

This fixes a small mistake introduced recently in
'package-vc--build-documentation' which causes it to error out when its
'file' argument isn't a directory.



In GNU Emacs 30.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.16.0) of 2023-06-21 built on coldharbour
Repository revision: 6085ee8139cc3d815a5028babb4daf438df9d06b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Void Linux

Configured using:
 'configure -C --prefix=/opt/Emacs --with-x --with-x-toolkit=gtk3
 --without-gsettings --without-dbus --with-xinput2 --with-small-ja-dic
 --with-native-compilation'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-VC-package-build-when-there-is-no-docs-dir.patch --]
[-- Type: text/patch, Size: 1184 bytes --]

From b21139b7d900d6c3bd38b2790758d2c1b631ada3 Mon Sep 17 00:00:00 2001
From: Daniel Semyonov <daniel@dsemy.com>
Date: Fri, 23 Jun 2023 08:40:57 +0300
Subject: [PATCH] Fix VC package build when there is no docs dir

* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation): Set
'docs-directory' to 'default-directory' if 'file' isn't a directory.
---
 lisp/emacs-lisp/package-vc.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index f34cfb3120b..b87bcbc738e 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -386,7 +386,8 @@ package-vc--build-documentation
 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 (expand-file-name (file-name-directory file)))
+         (docs-directory (if (file-name-directory file)
+                             (expand-file-name file) default-directory))
          (output (expand-file-name (format "%s.info" pkg-name)))
          clean-up)
     (when (string-match-p "\\.org\\'" file)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-25 21:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23  5:45 bug#64242: [PATCH] Fix VC package build when there is no docs dir Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-23  6:02 ` Eli Zaretskii
2023-06-23  6:32   ` Daniel Semyonov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-23  7:10     ` Eli Zaretskii
2023-06-23  7:35       ` Philip Kaludercic
2023-06-24 10:24         ` Philip Kaludercic
2023-06-24 10:43           ` Eli Zaretskii
2023-06-24 15:34             ` Philip Kaludercic
2023-06-24 17:07               ` Eli Zaretskii
2023-06-25 21:41                 ` Philip Kaludercic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).