emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: package.el dependencies


From: Thierry Volpiatto
Subject: Re: package.el dependencies
Date: Sat, 31 Jan 2015 07:51:05 +0100

Artur Malabarba <address@hidden> writes:

> This will prevent deletion of obsolete depencies (packages which are
> dependencies but have a more recent version installed). To fix that,
> PKG in this function needs to be a package-desc object, and the
> function needs to be altered as follows.
>
> (defun package-used-elsewhere-p (pkg &optional pkg-list)
>   "Check in PKG-LIST if PKG is used elsewhere as dependency.
> When not specified, PKG-LIST default to `package-alist' with PKG entry 
> removed.
> Argument PKG is a package-desc.
> Returns name of the first package found in PKG-LIST where PKG is
> used as dependency."
>   (let ((name (package-desc-name pkg))
>         (version (package-desc-version pkg))
>         (most-recent-version (package-desc-version (assq name 
> package-alist))))
>     (unless (version< version most-recent-version)
>       (cl-loop with alist = (or pkg-list
>                                 (remove (assq name package-alist)
>                                         package-alist))
>                for p in alist thereis
>                (and (memq name (mapcar 'car (package-desc-reqs (cadr p))))
>                     (car p)))))

Anyway, this is not working, and need to be fixed differently, will do
next week.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]