[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin fa18a66 413/439: * elpa-admin.el: Improve doc build
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin fa18a66 413/439: * elpa-admin.el: Improve doc build for the :core packages |
Date: |
Sun, 17 Oct 2021 15:48:47 -0400 (EDT) |
branch: elpa-admin
commit fa18a667c03adfaf72d8e39151e8d0f05bea3e73
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* elpa-admin.el: Improve doc build for the :core packages
(elpaa--select-revision): Update in the target of symlinks
(elpaa--insert-repolinks): Fix problem for :core packages with files in
completely different directories.
(elpaa--build-Info-1): Add the surrounding dir (including the `emacs`
subdir) to the sandbox, and don't follow symlinks when opening an Org
file so we don't try to output the texi in the `emacs` subtree.
---
elpa-admin.el | 33 ++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/elpa-admin.el b/elpa-admin.el
index 5810924..82e8e5c 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -245,21 +245,21 @@ Assumes that the current worktree holds a snapshot
version."
(defun elpaa--select-revision (dir pkg-spec rev)
"Checkout revision REV in DIR of PKG-SPEC.
Do it without leaving the current branch."
- (let ((cur-rev
+ (let* ((ftn (file-truename
+ (expand-file-name (elpaa--main-file pkg-spec) dir)))
;; FIXME: Emacs-26's `vc-git-working-revision' ignores its arg and
;; uses uses the `default-directory' to get the revision.
- (let* ((ftn (file-truename
- (expand-file-name (elpaa--main-file pkg-spec) dir)))
- (default-directory (file-name-directory ftn)))
- (vc-working-revision ftn))))
+ (default-directory (file-name-directory ftn))
+ (cur-rev (vc-working-revision ftn)))
;; Don't fail in case `rev' is not known.
(if (or (not rev) (equal rev cur-rev))
(elpaa--message "Current revision is already desired revision!")
(with-temp-buffer
- (let ((default-directory (elpaa--dirname dir)))
- (elpaa--call t "git" "reset" "--merge" rev)
- (elpaa--message "Reverted to release revision %s\n%s"
- rev (buffer-string)))))))
+ ;; Run it within the true-filename directory holding the mainfile,
+ ;; so that for :core packages we properly affect the Emacs tree.
+ (elpaa--call t "git" "reset" "--merge" rev)
+ (elpaa--message "Reverted to release revision %s\n%s"
+ rev (buffer-string))))))
(defun elpaa--make-tar-transform (pkgname r)
(let ((from (nth 0 r)) (to (nth 1 r)))
@@ -1044,8 +1044,9 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(let* ((files (nth 2 pkg-spec))
(file (if (listp files)
(directory-file-name
- (file-name-directory
- (try-completion "" files)))
+ (or (file-name-directory
+ (try-completion "" files))
+ ""))
files)))
(mapcar (lambda (s) (concat s file))
`("cgit/emacs.git/tree/"
@@ -1588,13 +1589,19 @@ More at " (elpaa--default-url pkgname))
(elpaa--build-Info-1 f dir))))
(defun elpaa--build-Info-1 (docfile dir)
- (let* ((default-directory (elpaa--dirname dir))
+ (let* ((elpaa--sandboxed-ro-binds
+ (cons default-directory elpaa--sandboxed-ro-binds))
+ (default-directory (elpaa--dirname dir))
(tmpfiles '()))
(when (and docfile (file-readable-p docfile)
(string-match "\\.org\\'" docfile))
(with-temp-buffer
(elpaa--call-sandboxed
- t "emacs" "--batch" "-l" "ox-texinfo" docfile
+ t "emacs" "--batch" "-l" "ox-texinfo"
+ ;; When building :core packages, don't follow the symlink,
+ ;; otherwise Org will want to export into the Emacs tree!
+ "--eval" "(setq vc-follow-symlinks nil)"
+ docfile
"--eval" "(message \"ELPATEXI=%s\" (org-texinfo-export-to-texinfo))")
(message "%s" (buffer-string))
(goto-char (point-max))
- [nongnu] elpa-admin fae2e2e 412/439: * elpa-admin.el (elpaa--prune-old-tarballs): Fix computation of .sig name, (continued)
- [nongnu] elpa-admin fae2e2e 412/439: * elpa-admin.el (elpaa--prune-old-tarballs): Fix computation of .sig name, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0783750 417/439: * elpa-admin.el (elpaa--sandbox-extra-ro-dirs): New var, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d10026f 419/439: * elpa-admin.el: Preserve release tarballs at least 2 years, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 97ebbd5 405/439: * elpa-admin.el (elpaa--prune-old-tarballs): "(Re)move" the non-kept files, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8ed7b88 354/439: Rename vars and functions with `elpaa-` prefix, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d8903b6 358/439: * elpa-admin.el: Add some of the support needed to build Org packages, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7e5b75b 359/439: * elpa-admin.el: Add support for checking copyright notices, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c26df96 392/439: * elpa-admin.el: Allow `:doc` to specify several doc files, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 396a74b 421/439: Bump license for package pages to CC BY-ND 4.0, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c29da22 424/439: * elpa-admin.el: Generate SVG badges, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin fa18a66 413/439: * elpa-admin.el: Improve doc build for the :core packages,
Philip Kaludercic <=
- [nongnu] elpa-admin de2fd22 418/439: * elpa-admin.el (elpaa-read-config): Allow lists of strings, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e3683d9 426/439: elpa-admin.el: Improve the badge generation code, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8e351cc 425/439: * elpa-admin.el (elpaa--string-width): Use `elpaa--call`, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e850286 428/439: Merge branch 'elpa-admin' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa into elpa-admin, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 6b5c39d 423/439: ; * elpa-admin.el (elpaa--html-footer): Fix LibreJS support., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 4541ebe 430/439: * elpa-admin.el (elpaa--get-release-revision): Workaround for git bug, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 1beeffd 433/439: * elpa-admin.el (elpaa--make-one-tarball): Return nil on error!, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 005c37e 434/439: * README (Configuration (elpa-config)): Document `elpa-config`, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 97d2765 436/439: * elpa-admin.el (ignore-error): Add backward compatibility definition, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 9b28c79 432/439: * elpa-admin.el (elpaa--make-one-tarball-1): Return non-nil when built, Philip Kaludercic, 2021/10/17