[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin 2f122b0 251/439: Merge branch 'master' into new-webs
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin 2f122b0 251/439: Merge branch 'master' into new-website |
Date: |
Sun, 17 Oct 2021 15:48:13 -0400 (EDT) |
branch: elpa-admin
commit 2f122b050613520d0caedda2aba0ea633ddde830
Merge: a3dcbb3 858666e
Author: Nicolas Petton <nicolas@petton.fr>
Commit: Nicolas Petton <nicolas@petton.fr>
Merge branch 'master' into new-website
---
GNUmakefile | 6 ++++-
README | 2 +-
admin/archive-contents.el | 64 ++++++++++++++++++++++++++++++++++-------------
3 files changed, 53 insertions(+), 19 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index d23d523..7d6d100 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -8,7 +8,7 @@ SITE_DIR=site
.PHONY: archive-tmp changelogs process-archive archive-full org-fetch clean
all do-it
-all: all-in-place
+all: all-in-place .gitignore
CR_EXCEPTIONS=copyright_exceptions
.PHONY: check_copyrights
@@ -81,6 +81,10 @@ archive-full: archive-tmp org-fetch
#mkdir -p archive/admin
#cp admin/* archive/admin/
+.gitignore: externals-list
+ $(EMACS) -l $(CURDIR)/admin/archive-contents.el \
+ --eval '(archive-gitignore-externals "$<" "$@")'
+
# FIXME: Turn it into an `external', which will require adding the notion of
# "snapshot" packages.
org-fetch: archive-tmp
diff --git a/README b/README
index 7c5cd36..57d9ca9 100644
--- a/README
+++ b/README
@@ -37,7 +37,7 @@ release the new code.
** To add a package: (submission, submit)
Adding a basic package is very simple. There are thorough
-instructional, but the gist is that you:
+instructions below, but the gist of it is that you:
1. Notify emacs-devel@gnu.org.
2. Place all files inside `packages/<pkg-name>/'.
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index f3b4db8..7af9b3c 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -1,6 +1,6 @@
;;; archive-contents.el --- Auto-generate an Emacs Lisp package archive. -*-
lexical-binding:t -*-
-;; Copyright (C) 2011-2015 Free Software Foundation, Inc
+;; Copyright (C) 2011-2016 Free Software Foundation, Inc
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
@@ -21,7 +21,7 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'lisp-mnt)
(require 'package)
(require 'pcase)
@@ -36,8 +36,8 @@
(when vers
(let ((l (version-to-list vers)))
;; Signal an error for things like "1.02" which is parsed as "1.2".
- (assert (equal vers (package-version-join l)) nil
- "Unsupported version syntax %S" vers)
+ (cl-assert (equal vers (package-version-join l)) nil
+ "Unsupported version syntax %S" vers)
l)))
(defun archive--convert-require (elt)
@@ -585,6 +585,14 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
packages)
(archive--html-make-index archive-contents)))
+(defun archive--pull (dirname)
+ (let ((default-directory (file-name-as-directory
+ (expand-file-name dirname))))
+ (with-temp-buffer
+ (message "Running git pull in %S" default-directory)
+ (call-process "git" nil t nil "pull")
+ (message "Updated %s:\n%s" dirname (buffer-string)))))
+
;;; Maintain external packages.
(defconst archive--elpa-git-url "git://git.sv.gnu.org/emacs/elpa")
@@ -603,10 +611,8 @@ Return non-nil if there's an \"emacs\" repository present."
(if (not (file-directory-p emacs-repo-root))
(progn (message "No \"emacs\" subdir: will skip :core packages")
nil)
- (let ((default-directory emacs-repo-root))
- (message "Running git pull in %S" default-directory)
- (call-process "git" nil t nil "pull")
- t))))
+ (archive--pull emacs-repo-root)
+ t)))
(defun archive--find-non-trivial-file (dir)
(catch 'found-important-file
@@ -627,7 +633,13 @@ If WITH-CORE is non-nil, it means we manage :core packages
as well."
(let ((default-directory (expand-file-name "packages/")))
(dolist (dir (directory-files "."))
(cond
- ((or (not (file-directory-p dir)) (file-symlink-p dir))
+ ((file-symlink-p dir)
+ ;; There are normally no such thing, but the user may elect to
+ ;; add symlinks to other projects. If so, update them, as if they
+ ;; were "externals".
+ (when (file-directory-p (expand-file-name ".git" dir))
+ (archive--pull dir)))
+ ((or (not (file-directory-p dir)) )
;; We only add/remove plain directories in elpa/packages (not
;; symlinks).
nil)
@@ -666,7 +678,7 @@ If WITH-CORE is non-nil, it means we manage :core packages
as well."
(let* ((branch (concat "externals/" name))
(output
(with-temp-buffer
- ;; FIXME: Use git-new-workdir!
+ ;; FIXME: Use `git worktree'!
(call-process "git" nil t nil "clone"
"--reference" ".." "--single-branch"
"--branch" branch
@@ -675,13 +687,7 @@ If WITH-CORE is non-nil, it means we manage :core packages
as well."
(message "Cloning branch %s:\n%s" name output)))
((not (file-directory-p (concat name "/.git")))
(message "%s is in the way of an external, please remove!" name))
- (t
- (let ((default-directory (file-name-as-directory
- (expand-file-name name))))
- (with-temp-buffer
- (message "Running git pull in %S" default-directory)
- (call-process "git" nil t nil "pull")
- (message "Updated %s:%s" name (buffer-string))))))))
+ (t (archive--pull name)))))
(defun archive--core-package-empty-dest-p (dest)
"Return non-nil if DEST is an empty variant."
@@ -784,5 +790,29 @@ If WITH-CORE is non-nil, it means we manage :core packages
as well."
(_ (message "Unknown external package kind `%S' for %s"
kind name)))))))
+;;; Manage .gitignore
+
+(defun archive-gitignore-externals (elf gf)
+ (let* ((el (read (find-file-noselect elf)))
+ (exts (delq nil
+ (mapcar (lambda (x)
+ (if (eq :external (nth 1 x)) (car x)))
+ el)))
+ (core (delq nil
+ (mapcar (lambda (x)
+ (if (eq :core (nth 1 x)) (car x)))
+ el))))
+ (with-current-buffer (find-file-noselect gf)
+ (goto-char (point-min))
+ (when (re-search-forward
+ "#.*External.*git.*\n\\(packages/[^*/\n]+/?\n\\)+"
+ nil 'move)
+ (replace-match ""))
+ (insert "# External packages with their own .git tree [autogenerated].\n"
+ (mapconcat (lambda (p) (format "packages/%s/\n" p))
+ (sort (append exts core) #'string<)
+ ""))
+ (save-buffer))))
+
(provide 'archive-contents)
;;; archive-contents.el ends here
- [nongnu] elpa-admin 134842c 174/439: Merge commit '0e1d1440e4819d76cc68b213431722884af66e89', (continued)
- [nongnu] elpa-admin 134842c 174/439: Merge commit '0e1d1440e4819d76cc68b213431722884af66e89', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 62629ab 224/439: Merge commit 'd827bb511203a64da3ae5cc6910b87b7c99d233b', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 581dd5b 231/439: Fix a typo in the readme, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 864099f 232/439: packages/yasnippet: pull from external (0.10.0), Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5d00f35 237/439: Merge commit 'a8bd8678db59322dac1015576716c4ebb2c628df', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a9287ff 239/439: Merge commit '48b48807a8917e455b5687945a81375703bd1a6e', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8730258 240/439: Merge commit 'ab69dbcccb4d0ed5ec2a7bd6bc7b3cff7e7adbac', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin ac713ed 242/439: Merge commit 'bdbbc65028af8deb55a4e474be43b5b99e6cc539', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 9c513a6 246/439: Merge commit 'db34a79efd068f28643cefd6f16a7329ba24dbf1', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b14148a 249/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 2f122b0 251/439: Merge branch 'master' into new-website,
Philip Kaludercic <=
- [nongnu] elpa-admin b9ba590 252/439: packages/yasnippet: Merge external (v0.11.0), Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c670f77 253/439: Merge branch 'master' into new-website, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7626ffa 254/439: Website footer improvement, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 294407d 256/439: README: Fix copyright years., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 34ecb5f 257/439: Respect .elpaignore when compiling and optimize compilation., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 82a2bda 259/439: Put tar'd files at the end to fix build in some environments., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5660f25 261/439: [admin] Add abstraction: archive--read-externals-list, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c101039 265/439: [admin int] Add abstraction: archive-call, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 98bcea9 268/439: [admin int] Add abstraction: archive--dirname, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 186d10f 269/439: Clear executable bit for Emacs Lisp files., Philip Kaludercic, 2021/10/17