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: Sat, 31 Jan 2015 10:58:23 +0000 Message-ID: References: <87wq4dpqib.fsf@gmail.com> <87wq44su8v.fsf@gmail.com> <878ugj7ajz.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=001a113d596692c7dc050df09948 X-Trace: ger.gmane.org 1422701920 13632 80.91.229.3 (31 Jan 2015 10:58:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Jan 2015 10:58:40 +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 31 11:58:40 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 1YHVl9-00048T-SA for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2015 11:58:40 +0100 Original-Received: from localhost ([::1]:40239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHVl9-0003ma-65 for ged-emacs-devel@m.gmane.org; Sat, 31 Jan 2015 05:58:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHVkv-0003mQ-8r for emacs-devel@gnu.org; Sat, 31 Jan 2015 05:58:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHVku-0007kV-6s for emacs-devel@gnu.org; Sat, 31 Jan 2015 05:58:25 -0500 Original-Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:42345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHVku-0007kE-1G for emacs-devel@gnu.org; Sat, 31 Jan 2015 05:58:24 -0500 Original-Received: by mail-oi0-f54.google.com with SMTP id v63so38305409oia.13 for ; Sat, 31 Jan 2015 02:58:23 -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=xfKC1OxCwO+h7LG0eb6fyc/4GbqMxqk10RvhWkYJafc=; b=uKwc4FYpns3Ri5Ty/r8xYLlHDhrGiFJ07ULOLlxknRbOnavxuqEPkCCEFLIMFePj4U g+RvrfpEJOYIPZ9Y0e0uHpqxoFVPy9HUMRm9mBAkwuEqKS12MoCi47LGj72MEjqusbb/ fAoWRS9rLnk183ubkg3C9s15pC7/4nbfDg93A98/nVFCTAh+bAbY7alxZhg3285YsNbB ufRoEOIqlLYRkwZu+3XRfIHq/8lONTG8XYcuO4tyS5iXQNkPXzKtlhDQu6RMEBBlJpef GOpMAe+4cShP0l6WX/cVufQ/btvWWtxObQwMwP2H6ihzqsnd0hOeHnIV68sZY2fNQwi+ y0vQ== X-Received: by 10.202.97.130 with SMTP id v124mr6082406oib.34.1422701903396; Sat, 31 Jan 2015 02:58:23 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Sat, 31 Jan 2015 02:58:23 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Sat, 31 Jan 2015 02:58:23 -0800 (PST) In-Reply-To: <878ugj7ajz.fsf@gmail.com> X-Google-Sender-Auth: aEPp2Wrmm5EWkJLlyX59ZKn5ac8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::236 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:182123 Archived-At: --001a113d596692c7dc050df09948 Content-Type: text/plain; charset=UTF-8 > > This will prevent deletion of obsolete depencies (packages which are > > dependencies but have a more recent version installed). To fix that, > > PKG in this function needs to be a package-desc object, and the > > function needs to be altered as follows. > > Can you explain this with a real life example ? The user hits U on the package menu, and a dependency is marked for upgrade. The user hits x to execute the transactions. The new version of the package is installed, then the old version is deleted. When package-delete is called on the old package, you get an error because this package is used elsewhere, even though it's fine to delete it (because there's a newer version installed). Maybe I'm just reading it wrong, but that's what it looks like to me. Again, package-used-elsewhere-p needs to take a package object, not a symbol. Note, the fix I proposed only works if you also change package-delete to actually pass an object to the function when it is called. > > IIUC, this will remove a package from packages-installed-directly if > > it is not currently installed. That seems undesirable, and would be > > fixed by simply removing this call to `customize-save-variable'. > > And I disagree on this one. Do you disagree that it's undesirable, or do you disagree that it well happen? --001a113d596692c7dc050df09948 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

> > This will prevent deletion of obsolete depencies (= packages which are
> > dependencies but have a more recent version installed). To fix th= at,
> > PKG in this function needs to be a package-desc object, and the > > function needs to be altered as follows.
>
> Can you explain this with a real life example ?

The user hits U on the package menu, and a dependency is mar= ked for upgrade. The user hits x to execute the transactions. The new versi= on of the package is installed, then the old version is deleted. When packa= ge-delete is called on the old package, you get an error because this packa= ge is used elsewhere, even though it's fine to delete it (because there= 's a newer version installed).

Maybe I'm just reading it wrong, but that's what it = looks like to me. Again, package-used-elsewhere-p needs to take a package o= bject, not a symbol.
Note, the fix I proposed only works if you also change package-delete to ac= tually pass an object to the function when it is called.

> > IIUC, this will remove a package from packages-ins= talled-directly if
> > it is not currently installed. That seems undesirable, and would = be
> > fixed by simply removing this call to `customize-save-variable= 9;.
>
> And I disagree on this one.

Do you disagree that it's undesirable, or do you disagre= e that it well happen?

--001a113d596692c7dc050df09948--