From f3ea2a3c601d439963bd98a0f67a8718d7610577 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 28 Jan 2014 19:04:50 +0100 Subject: [PATCH 1/3] Allow symbol or string for building package. This makes sense since functions such as package-build-checkout take a symbol as argument. Preferably package-build should use one of them all over place and not mix. --- package-build.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package-build.el b/package-build.el index f49544ac..c738fdf3 100644 --- a/package-build.el +++ b/package-build.el @@ -841,6 +841,8 @@ syntax is currently only documented in the MELPA README. You can simply pass `package-build-default-files-spec' in most cases. Returns the archive entry for the package." + (when (symbolp package-name) + (setq package-name (symbol-name package-name))) (let ((files (package-build-expand-file-specs source-dir file-specs))) (cond ((not version) From 4a0b7b01631bd4547f3e67bf757dd03e9d421667 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 28 Jan 2014 19:06:30 +0100 Subject: [PATCH 2/3] Improve debug information when running process fail. --- package-build.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-build.el b/package-build.el index c738fdf3..a56da21b 100644 --- a/package-build.el +++ b/package-build.el @@ -155,8 +155,8 @@ Output is written to the current buffer." (cons command args)))) (let ((exit-code (apply 'process-file (car argv) nil (current-buffer) t (cdr argv)))) (unless (zerop exit-code) - (error "Command '%s' exited with non-zero status %d" - argv exit-code))))) + (error "Command '%s' exited with non-zero status %d: %s" + argv exit-code (buffer-string)))))) (defun pb/run-process-match (regex dir prog &rest args) "Find match for REGEX when - in DIR, or `default-directory' if unset - we run PROG with ARGS." From bf2d52b26b2008d16c232f08aac637fa297f267e Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 28 Jan 2014 19:07:07 +0100 Subject: [PATCH 3/3] Default directory should end with slash. We can only do that if the directory already exist. But sometimes the command that is to be run is what creates the directory, hence it does not exist. So we only end with slash if the directory exists. --- package-build.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package-build.el b/package-build.el index a56da21b..80ad6635 100644 --- a/package-build.el +++ b/package-build.el @@ -149,6 +149,10 @@ function for access to this function") "In DIR (or `default-directory' if unset) run COMMAND with ARGS. Output is written to the current buffer." (let* ((default-directory (or dir default-directory)) + (default-directory + (if (file-directory-p default-directory) + (concat (directory-file-name default-directory) "/") + default-directory)) (have-timeout (executable-find "timeout")) (argv (if have-timeout (append (list "timeout" "-k" "60" "600" command) args)