[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin 642c7c1 203/439: Prevent accidental deletion of .git
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin 642c7c1 203/439: Prevent accidental deletion of .git |
Date: |
Sun, 17 Oct 2021 15:48:02 -0400 (EDT) |
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)" \
- [nongnu] elpa-admin 428b368 137/439: Add "rudel" to the list of externals., (continued)
- [nongnu] elpa-admin 428b368 137/439: Add "rudel" to the list of externals., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 88fb267 150/439: Update README to tell how to checkout a single external package., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 773b9dd 147/439: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5e1943e 157/439: Merge commit '469cd3bc117bfb8da0c03a2a2fb185e80c81d068', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin ed4d0fa 163/439: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 1b86fe8 166/439: Add 'packages/load-relative/' from commit '15ffaa9ebf1b7bbfcc307d1716eec135253b3b8d', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8d5c048 169/439: Merge commit 'c876c3c62f03d7e945b049932a55496b3cdfe05d', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d5d2dd5 173/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a0bc800 185/439: Squashed 'packages/pinentry/' content from commit 075deb6, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 627a556 177/439: Update packages/darkroom by merging its external subtree, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 642c7c1 203/439: Prevent accidental deletion of .git,
Philip Kaludercic <=
- [nongnu] elpa-admin a8b876c 207/439: * admin/archive-contents.el: Make :core handling optional, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 368a212 219/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 5cf5115 228/439: * admin/archive-contents.el (archive--pull): New function, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 94d527c 121/439: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 80a4836 120/439: Merge branch 'master' of git://bzr.sv.gnu.org/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin f1f09fa 118/439: more tutorial, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c5f517e 130/439: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a7a8990 132/439: Fix prefix of last merge and restore deleted files, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a84afce 149/439: Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d4269e6 141/439: Make sure removal of $(ARCHIVE_TMP)/packages/$(pkg) does not prompt interactively., Philip Kaludercic, 2021/10/17