[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa-admin 642c7c1 203/357: Prevent accidental deletion of .git
From: |
Stefan Monnier |
Subject: |
[elpa] elpa-admin 642c7c1 203/357: Prevent accidental deletion of .git |
Date: |
Thu, 10 Dec 2020 18:06:44 -0500 (EST) |
branch: elpa-admin
commit 642c7c1191800212260d186e3366f9d5229e25ff
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Prevent accidental deletion of .git
* GNUmakefile (check_copyrights, process-archive, org-fetch)
(%-autoloads.el): Use && after cd command.
---
GNUmakefile | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index cc5be30..ad29cc6 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -14,7 +14,7 @@ CR_EXCEPTIONS=copyright_exceptions
check_copyrights:
@echo "Compute exceptions >$(CR_EXCEPTIONS)~"
@export LC_ALL=C; \
- (cd packages; \
+ (cd packages && \
find . -name '.git' -prune -o \
-name 'test' -prune -o \
-name '*.el' -print0 | \
@@ -40,14 +40,21 @@ archive-tmp: packages
mkdir -p $(ARCHIVE_TMP)
cp -a packages/. $(ARCHIVE_TMP)/packages
+# Use && after the cd commands, not ;, to ensure the build fails
+# immediately if the directory $(ARCHIVE_TMP)/packages does not exist.
+# For process-archive this is crucial; otherwise batch-make-archive in
+# archive-contents.el will interpret directories in the current
+# directory as unreleased packages, and recursively delete them,
+# including .git. Prior to using &&, running "make process-archive"
+# could silently delete all local git history!
process-archive:
# FIXME, we could probably speed this up significantly with
# rules like "%.tar: ../%/ChangeLog" so we only rebuild the packages
# that have indeed changed.
- cd $(ARCHIVE_TMP)/packages; \
+ cd $(ARCHIVE_TMP)/packages && \
$(EMACS) -l $(CURDIR)/admin/archive-contents.el \
-f batch-make-archive
- @cd $(ARCHIVE_TMP)/packages; \
+ @cd $(ARCHIVE_TMP)/packages && \
for pt in *; do \
if [ -f "$${pt}/.elpaignore" ]; then \
ignore="$${pt}/.elpaignore"; \
@@ -76,7 +83,7 @@ archive-full: archive-tmp org-fetch
# FIXME: Turn it into an `external', which will require adding the notion of
# "snapshot" packages.
org-fetch: archive-tmp
- cd $(ARCHIVE_TMP)/packages; \
+ cd $(ARCHIVE_TMP)/packages && \
pkgname=`curl -s http://orgmode.org/elpa/|perl -ne 'push @f, $$1 if
m/(org-\d{8})\.tar/; END { @f = sort @f; print "$$f[-1]\n"}'`; \
wget -q http://orgmode.org/elpa/$${pkgname}.tar -O $${pkgname}.tar; \
if [ -f $${pkgname}.tar ]; then \
@@ -123,7 +130,7 @@ autoloads := $(foreach pkg, $(pkgs), $(pkg)/$(notdir
$(pkg))-autoloads.el)
$(foreach al, $(autoloads), $(eval $(call RULE-srcdeps, $(al))))
%-autoloads.el:
@echo 'Generating autoloads for $@'
- @cd $(dir $@); \
+ @cd $(dir $@) && \
$(EMACS) -l $(CURDIR)/admin/archive-contents.el \
--eval "(archive--refresh-pkg-file)" \
--eval "(require 'package)" \
- [elpa] elpa-admin 833084f 126/357: Add 'packages/web-server/' from commit 'd0b6ae9df6014db2195da0081dc97cc8246f1fda', (continued)
- [elpa] elpa-admin 833084f 126/357: Add 'packages/web-server/' from commit 'd0b6ae9df6014db2195da0081dc97cc8246f1fda', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 876bb45 128/357: Merge git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 8861b20 138/357: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin a3f667f 133/357: Don't allow package-initialize to use ~/.emacs.d, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 60d74f2 136/357: Merge commit 'aecfbcbc10cf03ec94062ac3e590f8118e5a0434', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 428b368 137/357: Add "rudel" to the list of externals., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 3038d13 151/357: README: Use remote.origin.url to avoid loosing write access and save some typing., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 773b9dd 147/357: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 1b86fe8 166/357: Add 'packages/load-relative/' from commit '15ffaa9ebf1b7bbfcc307d1716eec135253b3b8d', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 839fe96 209/357: * GNUmakefile (check_copyrights): Skip symlinks, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 642c7c1 203/357: Prevent accidental deletion of .git,
Stefan Monnier <=
- [elpa] elpa-admin ff431a8 223/357: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 0907441 229/357: packages/yasnippet: subtree pull from external, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin c8b582a 220/357: Merge commit '1054ea1bc5b07a1438a18c1b33f4266b28ff9d77', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 8c08096 285/357: * GNUmakefile (org-fetch): Don't stop the whole update if it fails., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 8154769 282/357: * copyright_exceptions: Update for new uni-confusables/gen-confusables.el, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 6734638 244/357: Merge commit 'd7bac581f04756582078cd9ea45e5a28406ee05c', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin d276c3d 288/357: * README: Don't clone a clone., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 5ac89c8 281/357: * packages/yasnippet: Merge version 0.12.2 from upstream., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin f25cda3 303/357: * GNUmakefile (%.elc): Use load-prefer-newer, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 21c69f7 308/357: Merge commit 'c304ac9a80ab7e96f705771a3842a48bf5a32c8a', Stefan Monnier, 2020/12/10