From b26c3c8899ae25cb696e90ffa570f8d5635a7a89 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 26 Apr 2023 23:08:21 -0700 Subject: [PATCH] Isolate building packages some more MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't load the user init file while building my Emacs packages, make sure to use a different ‘package-user-dir’ so that bad packages don't interfere and it doesn't accidentally work because of existing packages. Specify the ‘package-archive-upload-base’ in the Makefile so that there is only one place to look and modify if this needs to move. Ensure that the ‘package-archive-upload-base’ exists before uploading to it. --- GNUmakefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 3bbf1c3..bd54c60 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,10 +3,13 @@ FILES := $(wildcard oni-*.el) PACKAGE_TARGETS := $(addprefix package-,$(FILES)) define upload = - emacs --batch \ + emacs --quick --batch \ + --eval "(setq package-user-dir \"local-elpa/\")" \ --load oni-package.el \ --funcall package-initialize \ - --eval "(package-upload-file $1)" + --eval "(let ((package-archive-upload-base \"bin/\")) \ + (mkdir package-archive-upload-base t) \ + (package-upload-file $1))" endef define upload-multi-file =