GNU bug report logs - #16313
24.3; package-delete does not update package-alist

Previous Next

Package: emacs;

Reported by: stephen_leake <at> stephe-leake.org

Date: Wed, 1 Jan 2014 12:39:01 UTC

Severity: normal

Tags: moreinfo

Found in version 24.3

Fixed in version 24.4

Done: Bastien Guerry <bzg <at> altern.org>

Bug is archived. No further changes may be made.

Full log


Message #24 received at 16313 <at> debbugs.gnu.org (full text, mbox):

From: Bastien <bzg <at> altern.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Tom Tromey <tromey <at> redhat.com>, 16313 <at> debbugs.gnu.org
Subject: Re: bug#16313: 24.3; package-delete does not update package-alist
Date: Wed, 08 Jan 2014 00:08:09 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> Bastien Guerry wrote:
>
>> Still, package-delete did not cleanly delete the package from
>> package-alist, only its description.
>
> _Should_ it remove the entire entry? It's not obvious to me, given eg
> the way package-installed-p works.

Tom may confirm or infirm this, but I think it should.
The fact that package-installed-p checks for the description
seems due to the min-version parameter, and indeed, IMO the
function should be first checking for the package name before
its description.

>> I pushed a fix to cleanly remove the package occurrence.
>
> -        (delete pkg-desc (assq name package-alist)))
> +       (delete (delete pkg-desc (assq name package-alist)) package-alist))
>
> That doesn't work for the first item in the list.
> Why not the more obvious
>
> (setq package-alist (delete (assq name package-alist) package-alist))

No reason, the above is better.

Should I fix this or wait for Tom's feedback?

-- 
 Bastien




This bug report was last modified 11 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.