From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: package.el dependencies Date: Mon, 26 Jan 2015 08:17:35 +0100 Message-ID: <87r3uim2nk.fsf@gmail.com> References: <87wq4dpqib.fsf@gmail.com> <873871p5vt.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422256674 21483 80.91.229.3 (26 Jan 2015 07:17:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2015 07:17:54 +0000 (UTC) Cc: Artur Malabarba , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 26 08:17:53 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 1YFdvi-0001xR-Vb for ged-emacs-devel@m.gmane.org; Mon, 26 Jan 2015 08:17:51 +0100 Original-Received: from localhost ([::1]:40234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFdvi-000870-18 for ged-emacs-devel@m.gmane.org; Mon, 26 Jan 2015 02:17:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFdve-00086i-Fv for emacs-devel@gnu.org; Mon, 26 Jan 2015 02:17:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFdvb-0007qQ-Ad for emacs-devel@gnu.org; Mon, 26 Jan 2015 02:17:46 -0500 Original-Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:56146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFdvb-0007og-45 for emacs-devel@gnu.org; Mon, 26 Jan 2015 02:17:43 -0500 Original-Received: by mail-we0-f174.google.com with SMTP id w55so1943155wes.5 for ; Sun, 25 Jan 2015 23:17:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; bh=R6Uqd2BDEmADpBndm1Uuujo6FNaizwVjV9/zhgVWnkk=; b=MFogBy8hrqPol5IX52O5w1p+Wgmzi5bjVvm3Zo4tZ0MFtnlXYSOpnnGTmdVBLc/UEO u6O1GXurEPfYoyoDfZA05rl17fCLfpJKkPUuIhYaLDnCC804Jj8LMTcY9ZJ34TSO0VMJ uQnJ7/locaZSGsM7SdmdVO/rpmemSke/iZIMKx3tdJRu6nS/FgQbJz8ONL61FiZZOTmQ ibMLEve9OXIA+Moinwr/1iWVOTdlVPoKLg7xMV7s+FfZhY6+RtoW1ut9ZLaol+mCD5ja LU32BHngwqNfJuYemVJqmZdVbiwVRZaf3R9KtcbFFkDkC56XL4SQAbNlMSWZesraqFzV jlaQ== X-Received: by 10.194.75.195 with SMTP id e3mr24773680wjw.44.1422256662090; Sun, 25 Jan 2015 23:17:42 -0800 (PST) Original-Received: from dell-14z ([37.161.98.145]) by mx.google.com with ESMTPSA id q10sm13059474wjx.34.2015.01.25.23.17.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 25 Jan 2015 23:17:40 -0800 (PST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::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:181779 Archived-At: Stefan Monnier writes: >> I don't think we need an alist for that. Simply marking which packages >> were installed explicitly in a plain list should be enough. > > Agreed. > >> (In fact, maybe the "instaleed explicitly" flag could be stored in >> `package-alist' too, instead of its own list.) > > You can integrate the data into package-alist, but it needs to be stored > elsewhere since it needs to be stored into a file (my preference is to > store it into a Custom var and rely on Custom to save that into a file). I don't think it will be enough, we will have to store also a plain list of the package to autoremove because the info about the dependencies in package-alist will not be anymore available when deinstalling a package unless autoremove is launched right now before quitting emacs, which is not what we want. 1) install a package, it is added to the package-installed-directly list. 2) store this list. 3) delete the package it is removed from package-alist, and we should also remove it from package-installed-directly list. 4) quit emacs 5) restart emacs, even if we kept the package in packages-installed-directly (why) we will not have the dependencies in package-alist, so we will have to fetch these infos again, recompute the autoremove list etc... IMO it is simpler to delete the package from the packages-installed-directly list as soon it is removed and store also the autoremove list. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997