From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: package.el dependencies Date: Tue, 3 Feb 2015 10:05:09 +0000 Message-ID: References: <87wq4dpqib.fsf@gmail.com> <87wq44su8v.fsf@gmail.com> <878ugj7ajz.fsf@gmail.com> <874mr67gjb.fsf@gmail.com> <87oapervqv.fsf@gmail.com> <877fw2kp1y.fsf@gmail.com> <87d25tps2q.fsf@gmail.com> <87egq83veh.fsf@gmail.com> <87mw4veefv.fsf@gmail.com> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0115ffbcc2fd98050e2c34d8 X-Trace: ger.gmane.org 1422957948 16503 80.91.229.3 (3 Feb 2015 10:05:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2015 10:05:48 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 03 11:05:43 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YIaMZ-0006fG-3S for ged-emacs-devel@m.gmane.org; Tue, 03 Feb 2015 11:05:43 +0100 Original-Received: from localhost ([::1]:58474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIaMY-0001sQ-Hz for ged-emacs-devel@m.gmane.org; Tue, 03 Feb 2015 05:05:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIaMA-0001rP-Nm for emacs-devel@gnu.org; Tue, 03 Feb 2015 05:05:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIaM2-0000l3-M1 for emacs-devel@gnu.org; Tue, 03 Feb 2015 05:05:18 -0500 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:42464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIaM2-0000kp-Fg for emacs-devel@gnu.org; Tue, 03 Feb 2015 05:05:10 -0500 Original-Received: by mail-oi0-f46.google.com with SMTP id a141so48515350oig.5 for ; Tue, 03 Feb 2015 02:05:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=+Ijfhpsxm+nKVdjsDsBVeGC0a1eot888TtYxUdCegcE=; b=Hmljm15wo+i7dy4Jd8WBx3lVxBY7d+lOM1IvMIpETAZRPJVXokRrwbPQk2fHxwCrJD wwq3JawOyd+tvIFbxkIjDM/LKFDmiDtuZ5Q1WomKzN7Ge+9m+zO2WYV0XrZTTUDCCOp8 y04cWHNeNXRmPbBtDRHLVT/VDckBiudWsTZHic/N4sF3rUcq359+b+QtHv+vpiz3EZHp xAb5gZxYaHH+FGOwVjMJ+Vzdhi08B7RIWMdBr48c+yMyCZBgrVUnYdgm5d868KL0X83x 12U1qVQDS3S6KPzTSIddj1uxXsmwj1D0rCLyZq3qbPG2thZAA6hxaM8VbtVueM8eofLT ypkQ== X-Received: by 10.60.54.199 with SMTP id l7mr14927364oep.37.1422957910095; Tue, 03 Feb 2015 02:05:10 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Tue, 3 Feb 2015 02:05:09 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Tue, 3 Feb 2015 02:05:09 -0800 (PST) In-Reply-To: <87mw4veefv.fsf@gmail.com> X-Google-Sender-Auth: fGx6QzjMtlTRyucp5L1OqunatyI X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182318 Archived-At: --089e0115ffbcc2fd98050e2c34d8 Content-Type: text/plain; charset=UTF-8 On 3 Feb 2015 05:45, "Thierry Volpiatto" wrote: > > > The first thing we have to fix now is package--get-deps, Arthur, yes you > are right we should recurse without the 'direct flag, so we should use > this version: > > (defun package--get-deps (pkg &optional only) > (let* ((pkg-desc (cadr (assq pkg package-alist))) > (direct-deps (cl-loop for p in (package-desc-reqs pkg-desc) > for name = (car p) > when (assq name package-alist) > collect name)) > (indirect-deps (unless (eq only 'direct) > (cl-loop for p in direct-deps > append (package--get-deps p) into lst > finally return (delete-dups lst))))) > (cl-case only > (direct direct-deps) > (separate (list direct-deps indirect-deps)) > (indirect indirect-deps) > (t (append direct-deps indirect-deps))))) > > > Can you push it ? Yes, but possibly not today. --089e0115ffbcc2fd98050e2c34d8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 3 Feb 2015 05:45, "Thierry Volpiatto" <thierry.volpiatto@gmail.com&g= t; wrote:
>
>
> The first thing we have to fix now is package--get-deps, Arthur, yes y= ou
> are right we should recurse without the 'direct flag, so we should= use
> this version:
>
> (defun package--get-deps (pkg &optional only)
> =C2=A0 (let* ((pkg-desc (cadr (assq pkg package-alist)))
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(direct-deps (cl-loop for p in (pack= age-desc-reqs pkg-desc)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for name =3D (car p)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0when (assq name package-alist)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0collect name))
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(indirect-deps (unless (eq only '= ;direct)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (cl-loop for p in direct-deps
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 append (package--get-deps p) into= lst
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 finally return (delete-dups lst))= )))
> =C2=A0 =C2=A0 (cl-case only
> =C2=A0 =C2=A0 =C2=A0 (direct=C2=A0 =C2=A0direct-deps)
> =C2=A0 =C2=A0 =C2=A0 (separate (list direct-deps indirect-deps))
> =C2=A0 =C2=A0 =C2=A0 (indirect indirect-deps)
> =C2=A0 =C2=A0 =C2=A0 (t=C2=A0 =C2=A0 =C2=A0 =C2=A0 (append direct-deps= indirect-deps)))))
>
>
> Can you push it ?

Yes, but possibly not today.

--089e0115ffbcc2fd98050e2c34d8--