summaryrefslogtreecommitdiff
path: root/helm-elisp-package.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2019-08-29 17:49:20 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2019-08-29 17:49:20 +0200
commit6edbad17bcfe90350b4d023b971226e7628a1a96 (patch)
treec1c23a28d6636743b3b7571a96166fd563e2c987 /helm-elisp-package.el
parent2fdeea3c272bec56fe1101cb2f2eeed05236908a (diff)
Fix package--user-installed-p
* helm-elisp-package.el (helm-el-package--user-installed-p): New. (helm-el-package--get-installed-to-recompile): Use it.
Diffstat (limited to 'helm-elisp-package.el')
-rw-r--r--helm-elisp-package.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/helm-elisp-package.el b/helm-elisp-package.el
index dcf3a3b1..b07418d9 100644
--- a/helm-elisp-package.el
+++ b/helm-elisp-package.el
@@ -225,12 +225,20 @@
"Find the installed packages in SEQ that have PKG-NAME as dependency."
(cl-loop for p in seq
for pkg = (package-desc-name p)
- for deps = (and (package--user-installed-p pkg)
+ for deps = (and (helm-el-package--user-installed-p pkg)
(package--get-deps pkg))
when (and (memq pkg-name deps)
(not (eq pkg-name pkg)))
collect (cons pkg p)))
+(defun helm-el-package--user-installed-p (package)
+ "Return non-nil if PACKAGE is a user-installed package."
+ (let* ((assoc (assq package package-alist))
+ (pkg-desc (and assoc (cadr assoc)))
+ (dir (and pkg-desc (package-desc-dir pkg-desc))))
+ (when dir
+ (file-in-directory-p dir package-user-dir))))
+
(defun helm-el-package-upgrade-1 (pkg-list)
(cl-loop for p in pkg-list
for pkg-desc = (car p)