From 1875431bf4d831b3b4726666735370fe730271c2 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 11 Jul 2015 11:04:21 +0200 Subject: customize unpack function - don't compile or activate package - take destination directory as a parameter --- dh-elpa.el | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'dh-elpa.el') diff --git a/dh-elpa.el b/dh-elpa.el index be74d4e..d3c18ed 100644 --- a/dh-elpa.el +++ b/dh-elpa.el @@ -25,11 +25,11 @@ ;; along with GNU Emacs. If not, see . ;; Originally package-unpack from package.el in Emacs 24.5 -(defun dhelpa-unpack (pkg-desc) +(defun dhelpa-unpack (pkg-desc destdir) "Install the contents of the current buffer as a package." (let* ((name (package-desc-name pkg-desc)) (dirname (package-desc-full-name pkg-desc)) - (pkg-dir (expand-file-name dirname package-user-dir))) + (pkg-dir (expand-file-name dirname destdir))) (pcase (package-desc-kind pkg-desc) (`tar (make-directory package-user-dir t) @@ -42,15 +42,6 @@ (package--write-file-no-coding el-file))) (kind (error "Unknown package kind: %S" kind))) (package--make-autoloads-and-stuff pkg-desc pkg-dir) - ;; Update package-alist. - (let ((new-desc (package-load-descriptor pkg-dir))) - ;; FIXME: Check that `new-desc' matches `desc'! - ;; FIXME: Compilation should be done as a separate, optional, step. - ;; E.g. for multi-package installs, we should first install all packages - ;; and then compile them. - (package--compile new-desc)) - ;; Try to activate it. - (package-activate name 'force) pkg-dir)) ;;; dh-elpa.el ends here -- cgit v1.2.3