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: Tue, 03 Feb 2015 05:53:38 +0100 Message-ID: <87oapbegtp.fsf@gmail.com> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422939238 22130 80.91.229.3 (3 Feb 2015 04:53:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2015 04:53:58 +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 Tue Feb 03 05:53:58 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 1YIVUo-0001JJ-Q8 for ged-emacs-devel@m.gmane.org; Tue, 03 Feb 2015 05:53:54 +0100 Original-Received: from localhost ([::1]:57755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIVUn-0000hL-Uv for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2015 23:53:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIVUj-0000h0-HQ for emacs-devel@gnu.org; Mon, 02 Feb 2015 23:53:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIVUg-0004vx-9p for emacs-devel@gnu.org; Mon, 02 Feb 2015 23:53:49 -0500 Original-Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:61508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIVUg-0004vt-2J for emacs-devel@gnu.org; Mon, 02 Feb 2015 23:53:46 -0500 Original-Received: by mail-wi0-f175.google.com with SMTP id fb4so21469751wid.2 for ; Mon, 02 Feb 2015 20:53:45 -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=bS8R42MY/ij9Hj9v6pqD4fJvs8vK9AbqXLbHK6KSwsw=; b=cYPt889dwjc8Cr/9TqHEladsdci1oUY+GwVj0gq24ULJ8Agugen76B1izU1B6nEErG HBBCKLfYhrC5jBa/2357fejx8hiYTkHIaWmpr+QqSsY3lgzga16aQ6M11TbX0VgBC0wO ElCXkWX34oCJ25x2CEBysKvuWgcvDNi08rxoQYr3ZRxM5KsHutbP/iOAaF6Z/wjdMTbu tnRAdMpj+Cud1/WS2M9kBJXx6FP3DpQ9Y7e+jSRjiDEBg+rR1DasYoJaxlVZFwiHEVhJ OSbiEd/dEg/AZF41FqLmHbSl6xB8YDbEOkSN4fVKZEmy5MZ2dITLLEZV75/4hUY5gBAa uh6w== X-Received: by 10.194.60.205 with SMTP id j13mr50622580wjr.42.1422939225281; Mon, 02 Feb 2015 20:53:45 -0800 (PST) Original-Received: from dell-14z ([37.164.47.180]) by mx.google.com with ESMTPSA id fo17sm30771332wjc.19.2015.02.02.20.53.42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 20:53:44 -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::22f 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:182307 Archived-At: Artur Malabarba writes: > > I was about to suggest the following. > > + (package-delete (cadr (assq pkg package-alist)) 'force) > + (package-install pkg selected))) At first I had the same idea, but after I thought it was calling two time custom-save-varaible for nothing (i.e one time to remove the package and on time to add it again), so I think it is better to just delete the package without removing it from the list. >>> One more thing: now that we have package-selected-packages, >>> package-delete should be fixed to be a real "inverse" of >>> package-install, i.e. it should delete its unused dependencies. >> >> Hmm, not sure it is a good idea. > > I'm on the fence on this. Personally, I would automate this (as Stefan > suggests). > But, of all linux package managers I've used, I don't remember any of > them removing dependencies without explicit request. > Other options, for the sake of completeness: > > 1. Just like we say "N packages can be upgraded, hit U...", we could > have a message saying "N packages are dependencies which are no longer > needed, hit R to remove them". > 2. After `package-execute' is done, we could check if there are any > unneeded deps and ask the user a 3rd question "The following > dependencies are no longer necessary, remove them? ...". If the user > answers `n' here, we can also ask "mark these as explicitily selected > to prevent future autoremoval?". apt-get is sending a message when running install saying "x packages are no more needed, remove them with apt-get autoremove", I think this would be enough. > My suggestion would be to change the "installed" string (displayed on > the status column) to "dependency" for packages that are not in > `package-selected-packages'. Agree. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997