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: Fri, 23 Jan 2015 22:50:12 -0200 Message-ID: References: <87wq4dpqib.fsf@gmail.com> <873871p5vt.fsf@gmail.com> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1422060631 28296 80.91.229.3 (24 Jan 2015 00:50:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2015 00:50:31 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 24 01:50:30 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 1YEovm-0004ZJ-Bg for ged-emacs-devel@m.gmane.org; Sat, 24 Jan 2015 01:50:30 +0100 Original-Received: from localhost ([::1]:33689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEovl-0000dk-QO for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 19:50:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEovV-0000dc-Tm for emacs-devel@gnu.org; Fri, 23 Jan 2015 19:50:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEovV-000131-7a for emacs-devel@gnu.org; Fri, 23 Jan 2015 19:50:13 -0500 Original-Received: from mail-ob0-x233.google.com ([2607:f8b0:4003:c01::233]:54713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEovV-00012u-36 for emacs-devel@gnu.org; Fri, 23 Jan 2015 19:50:13 -0500 Original-Received: by mail-ob0-f179.google.com with SMTP id vb8so421132obc.10 for ; Fri, 23 Jan 2015 16:50:12 -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=gt3PNIC88OSKbx1SDD86cO0d9XNIJJfjRYI1+C6mVWo=; b=LwGpN7TjNc23gY4ghUqwDSF8Zgc2jLLSUEjPBQDP47SlcHGXRx65yIMuaVTp5EA5ii aBuvwduJL2YZFCakr+tgVfAsStOsr53GmRh8ypfm3xaG0RiXg+0fTvU8WyGW3WFQ2aIL XiykAGmGNySBKPHwWe/sfF807+eRFJ/ZUwxE10M9d5gV+HvnZIkh7vQ0QXTVaYzIkuql kBbj+FruRyL0uIECxl+hkXy4h+54lU1fp3wquGa3exBQKefNUcu1RniBJnAbsa6P4Q4p Ulgk+/n5ZQ31wKK90FPt/ep58tQfT/VMfAhcJvW0clesWHejrtNKdNxDfk9uWn1tWi0d 20xg== X-Received: by 10.60.179.37 with SMTP id dd5mr6277179oec.4.1422060612244; Fri, 23 Jan 2015 16:50:12 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Fri, 23 Jan 2015 16:50:12 -0800 (PST) In-Reply-To: <873871p5vt.fsf@gmail.com> X-Google-Sender-Auth: ykQ7do8idol2sPBi4l9_5d0mBUc X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::233 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:181705 Archived-At: > The problem is we need to feed an alist of packages explicitely > installed with their dependencies, so of course all packages installed > prior this change will have to be reinstalled. > > The alist would looks like this: > > (setq packages-installed-explicitely > '((foo . (a b c d h)) > (bar . (b d e)) > (baz . (e f g)))) > where a b c... are dependencies. > I don't think we need an alist for that. Simply marking which packages were installed explicitly in a plain list should be enough. The dependency information is already available in `package-alist`, there's no need to replicate it in this other variable. (In fact, maybe the "instaleed explicitly" flag could be stored in `package-alist' too, instead of its own list.) Thus, when `foo' is removed, we loop through it's depedencies and remove each package which is neither `installed-explicitly' nor the dependency of something else.