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 10:54:56 +0100 Message-ID: <87ppa1n9xr.fsf@gmail.com> References: <87wq4dpqib.fsf@gmail.com> <873871p5vt.fsf@gmail.com> <87r3uim2nk.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422266126 6767 80.91.229.3 (26 Jan 2015 09:55:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2015 09:55:26 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: bruce.connor.am@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 26 10:55:25 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 1YFgOC-0007Nu-Dq for ged-emacs-devel@m.gmane.org; Mon, 26 Jan 2015 10:55:24 +0100 Original-Received: from localhost ([::1]:40757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFgOC-0001mi-0k for ged-emacs-devel@m.gmane.org; Mon, 26 Jan 2015 04:55:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFgNy-0001mU-OD for emacs-devel@gnu.org; Mon, 26 Jan 2015 04:55:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFgNv-0005c9-H6 for emacs-devel@gnu.org; Mon, 26 Jan 2015 04:55:10 -0500 Original-Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:42006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFgNv-0005Ww-9j for emacs-devel@gnu.org; Mon, 26 Jan 2015 04:55:07 -0500 Original-Received: by mail-wi0-f170.google.com with SMTP id em10so5040613wid.1 for ; Mon, 26 Jan 2015 01:55:05 -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=T9tHVeShkKmftK4JrwGGNzwHEJp1iaLSns7tuXWDay4=; b=ju6fxxCtGrDcGy+NXnwl9ddJmagQDgEYNCfd0d6nvJY0dx2iDyjcPGF/N5soUbe44E HRMsZNMo9r2wdIgVRNu8lYxS387H6/xuC//efJ3OpEzd2LaTHWE4fVBwIVc8oxxog3s+ /asbfxNuJKw2Be6c6eRdMJOc/2oMI0S0V4L3581lW2UCzHNQc3CcYz/lLgdMxmG6hOnD ZBojLq8wFZqbF/hAD+bxPtDUMInBeoLlzzJZbURmfLX6cyp2QMS0JfKWzHOnRG0+stRx j38KOE3hhZswdo9XwU6ZNO36jZ5lAR6uM5oRl2mjSKJV+F8BB3C1LhAbmHifUN8XoHLP r9Ig== X-Received: by 10.180.206.47 with SMTP id ll15mr27405190wic.34.1422266105319; Mon, 26 Jan 2015 01:55:05 -0800 (PST) Original-Received: from dell-14z ([37.161.98.145]) by mx.google.com with ESMTPSA id fo15sm13203126wic.19.2015.01.26.01.55.02 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 26 Jan 2015 01:55:04 -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:c05::22a 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:181782 Archived-At: Artur Malabarba writes: >> 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. > > I think the orphan dependencies should be autoremoved immediately > after the package is deleted, No, not necessarily, it should not be an obligation, one can delete a package and make a cleanup later, it is what apt-get does. > so we don't need to save a list of packages to be autoremoved. Here > are two ways I can see it happen. > > 1. When the user marks packages for deletion and then hits x, the > package transaction is performed as usual. Afterwards, we run a > function which loops through all packages and detect the ones that are > not needed by anything nor installed explicitly (the orphans) and > offer to delete them too. No, see above. > I agree. Why would we have kept it in this list? If a package is > deleted (without a newer version installed) it is removed from the > list. You assume the dependencies unneeded are removed straight after deleting, which is not the case. >> 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. > > Why does this imply the need for an autoremove list? Same see above. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997