summaryrefslogtreecommitdiff
path: root/dh-elpa.el
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2015-07-11 11:04:21 +0200
committerDavid Bremner <david@tethera.net>2015-07-11 11:04:21 +0200
commit1875431bf4d831b3b4726666735370fe730271c2 (patch)
tree4c408f945f3568487776c1938a5aea7332143883 /dh-elpa.el
parent1a81ba2462991cabc012fab9289d228f000d9010 (diff)
customize unpack function
- don't compile or activate package - take destination directory as a parameter
Diffstat (limited to 'dh-elpa.el')
-rw-r--r--dh-elpa.el13
1 files changed, 2 insertions, 11 deletions
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 <http://www.gnu.org/licenses/>.
;; 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