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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16313 in the body.
You can then email your comments to 16313 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Wed, 01 Jan 2014 12:39:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to stephen_leake <at> stephe-leake.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 01 Jan 2014 12:39:02 GMT) Full text and rfc822 format available.

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

From: stephen_leake <at> stephe-leake.org
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; package-delete does not update package-alist
Date: Wed, 01 Jan 2014 06:38:19 -0600
package-delete does not update package-alist

This means that package-installed-p will still return true after
package-delete deletes the package.

In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
 of 2013-03-17 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Package Menu

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  display-time-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
r s i o n - t o - l i s t SPC a d a - v e r s i o n
) C-SPC <M-left> <M-left> <M-left> <M-left> <M-left>
<left> <M-delete> <down> <down> <down> <left> <left>
<left> <left> <insert> <S-right> <S-right> <S-right>
<S-right> <S-right> <S-right> <left> <left> <M-left>
<left> <M-S-left> w i s i M-w <down> <down> <down>
<down> <right> C-SPC <down> <M-delete> <insert> <up>
<M-right> <M-right> <M-right> M-q a d a <return> w
i s i <return> SPC . M-w <up> <up> <up> <up> <up> <end>
<f5> <up> <up> <up> <up> <up> <up> <up> <up> <down>
<down> <f5> <end> <end> <end> <end> <end> <end> <f5>
<C-f5> g <end> <up> <end> <f5> <up> <up> <down> <down>
<C-f5> g <up> <end> <left> <right> <f5> <C-M-down>
<f12> ~ / e <backspace> . e m <tab> . <tab> e l <tab>
<return> <return> <down> <return> <f11> p a <right>
<return> C-s p a c k a g e - i n s t a l l e d C-s
<up> C-s p a c k a e <backspace> g e - d e l e t e
<switch-frame> C-u C-c p C-u C-c p <f11> n o <return>
C-s b u g <down> <M-left> <M-left> C-SPC <M-right>
<M-right> <M-right> <M-right> <C-f12> <switch-frame>
<switch-frame> M-x <up> <return> C-h k U C-h k ~ <help-echo>
<help-echo> M-x r e p o r t - b u <tab> <return> p
a c k a g e - e <backspace> d e l e t e SPC d o e s
SPC n o t SPC u p d a t e SPC <switch-frame> C-r o
n m s t a <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> i n s t a l l e d - p C-r <switch-frame>
C-g M-x <up> <return>

Recent messages:
Go...
string-equal: Wrong type argument: stringp, nil
t
Mark saved where search started [3 times]
Mark set
Saving file c:/home/stephe/.emacs.d/elpa/archives/test/archive-contents...
Wrote c:/home/stephe/.emacs.d/elpa/archives/test/archive-contents
1 package can be upgraded; type `U' to mark it for upgrading.
Type C-x 1 to delete the help window.

Quit

Load-path shadows:
c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/vc-git hides c:/Apps/emacs-24.3/lisp/vc/vc-git
c:/Projects/org.emacs.ada-mode.stephe-1/ada-mode hides c:/Apps/emacs-24.3/lisp/progmodes/ada-mode
c:/Projects/emacs_stephe.work/emacs_stephe_site_lisp/nnnil hides c:/Apps/emacs-24.3/lisp/gnus/nnnil

Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail
thingatpt browse-url info apropos texnfo-upd else-mode texinfo autoload
tar-mode mail-utils network-stream starttls url-http tls mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap finder-inf gnat-inspect ada-skel
ada-skeletons skeleton ada-xref-tool ada-gnat-xref ada-compiler
ada-gnat-compile gnat-core ada-indent-engine ada-wisi
ada-indent-user-options ada-grammar-wy wisi-compile semantic/wisent/comp
wisi wisi-parse semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet ada-fix-error ada-build ada-mode which-func
imenu align find-file dvc-state dvc-persistence xmtn-sync tabify man
xgit-dvc xgit cus-edit xgit-annotate rect dvc-annotate xgit-log
sh-script smie executable find-func xmtn-multi-status xmtn-revlist
dvc-revlist warnings dvc-config copyright misearch multi-isearch
make-mode shell pcomplete grep help-mode xmtn-dvc dvc-status dvc-diff
dvc-fileinfo diff-mode xmtn-conflicts xmtn-ids xmtn-match xmtn-automate
xmtn-compat parse-time xmtn-run xmtn-basic-io xmtn-base xgit-core
bzr-core xmtn-minimal dvc-log log-edit pcvs-util vc vc-dispatcher
ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
ediff-init ediff add-log dvc-autoloads dvc-unified dvc-tips ffap
url-parse auth-source eieio byte-opt bytecomp byte-compile cconv
gnus-util mm-util mail-prsvr password-cache url-vars dvc-core edebug
dvc-lisp dvc-buffers derived dvc-ui dvc-register dvc-utils dvc-emacs
ewoc dvc-defs dvc-site uniquify advice help-fns advice-preload time
delsel cus-start cus-load color-theme cl-macs gv edmacro kmacro wid-edit
cl cl-lib noutline outline easy-mmode iswitchb whitespace dired-x
easymenu dired-aux dired compile comint ansi-color ring
ada-mode-autoloads wisi-autoloads package time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns
disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process w32 multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Wed, 01 Jan 2014 21:13:01 GMT) Full text and rfc822 format available.

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

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: 16313 <at> debbugs.gnu.org
Subject: additional info
Date: Wed, 01 Jan 2014 15:12:26 -0600
May be related to 15918
-- 
-- Stephe




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Fri, 03 Jan 2014 04:21:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: stephen_leake <at> stephe-leake.org
Cc: 16313 <at> debbugs.gnu.org
Subject: Re: bug#16313: 24.3; package-delete does not update package-alist
Date: Thu, 02 Jan 2014 23:20:24 -0500
> package-delete does not update package-alist
[...]
> In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)

The package-delete code in Emacs's trunk includes:

      ;; Update package-alist.
      (let* ((name (package-desc-name pkg-desc)))
        (delete pkg-desc (assq name package-alist)))

So I suspect that this bug is already fixed in the trunk.
Can you check that it's indeed the case?  And if it's not, please
provide a recipe to reproduce the problem,


        Stefan




Reply sent to Bastien Guerry <bzg <at> altern.org>:
You have taken responsibility. (Tue, 07 Jan 2014 12:07:02 GMT) Full text and rfc822 format available.

Notification sent to stephen_leake <at> stephe-leake.org:
bug acknowledged by developer. (Tue, 07 Jan 2014 12:07:04 GMT) Full text and rfc822 format available.

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

From: Bastien Guerry <bzg <at> altern.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: stephen_leake <at> stephe-leake.org, 16313-done <at> debbugs.gnu.org
Subject: Re: bug#16313: 24.3; package-delete does not update package-alist
Date: Tue, 07 Jan 2014 11:57:27 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> The package-delete code in Emacs's trunk includes:
>
>       ;; Update package-alist.
>       (let* ((name (package-desc-name pkg-desc)))
>         (delete pkg-desc (assq name package-alist)))
>
> So I suspect that this bug is already fixed in the trunk.
> Can you check that it's indeed the case?

I just checked, this is the case.

Still, package-delete did not cleanly delete the package from
package-alist, only its description.

I pushed a fix to cleanly remove the package occurrence.

Closing this bug.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Tue, 07 Jan 2014 22:09:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 16313 <at> debbugs.gnu.org
Cc: bzg <at> altern.org
Subject: Re: bug#16313: 24.3; package-delete does not update package-alist
Date: Tue, 07 Jan 2014 17:08:36 -0500
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.

> 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))




bug Marked as fixed in versions 24.4. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 07 Jan 2014 22:10:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Tue, 07 Jan 2014 23:09:02 GMT) Full text and rfc822 format available.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Wed, 08 Jan 2014 05:11:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Bastien <bzg <at> altern.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:10:44 -0500
Bastien wrote:

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

I don't know why you are asking someone who hasn't changed the file in
3.5 years. You should wait for Stefan to answer, since he authored the
most recent changes to package-delete, has already commented on this
bug, and obviously knows how to delete an element from an alist.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Wed, 08 Jan 2014 08:45:01 GMT) Full text and rfc822 format available.

Message #30 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 09:41:04 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> Bastien wrote:
>
>> Should I fix this or wait for Tom's feedback?
>
> I don't know why you are asking someone who hasn't changed the file in
> 3.5 years. 

Obviously because I didn't check :)

> You should wait for Stefan to answer, since he authored the
> most recent changes to package-delete, has already commented on this
> bug, and obviously knows how to delete an element from an alist.

I'll practise

  (delete 'bzg emacs-contributors)

in the Rate Evict Programmers Loop for a while, and see if my
Emacs karma gets better.

Joke aside, I'll fix this myself later on today.

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Wed, 08 Jan 2014 08:45:02 GMT) Full text and rfc822 format available.

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

From: Bastien <bzg <at> altern.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 16313 <at> debbugs.gnu.org
Subject: Re: bug#16313: 24.3; package-delete does not update package-alist
Date: Wed, 08 Jan 2014 09:38:20 +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.

I've read through the code and I think package-delete should remove
the entire entry.  The docstring of package-alist also suggests so.

Let me know if I'm wrong.

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Wed, 08 Jan 2014 11:36:02 GMT) Full text and rfc822 format available.

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

From: Bastien <bzg <at> altern.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 16313-done <at> debbugs.gnu.org
Subject: Re: bug#16313: 24.3; package-delete does not update package-alist
Date: Wed, 08 Jan 2014 12:35:46 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> Bastien wrote:
>
>> Should I fix this or wait for Tom's feedback?
>
> I don't know why you are asking someone who hasn't changed the file in
> 3.5 years. You should wait for Stefan to answer, since he authored the
> most recent changes to package-delete, has already commented on this
> bug, and obviously knows how to delete an element from an alist.

I've now fixed this in revno 115918, closing the bug.

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16313; Package emacs. (Wed, 08 Jan 2014 14:09:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Bastien <bzg <at> altern.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 16313 <at> debbugs.gnu.org
Subject: Re: bug#16313: 24.3; package-delete does not update package-alist
Date: Wed, 08 Jan 2014 09:08:54 -0500
> I've read through the code and I think package-delete should remove
> the entire entry.  The docstring of package-alist also suggests so.
> Let me know if I'm wrong.

I don't have time to look at it now, but it sounds right, thank you,


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 06 Feb 2014 12:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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