GNU bug report logs - #14632
24.3.50; package-install-p returns nil after package-install

Previous Next

Package: emacs;

Reported by: Sebastian Wiesner <lunaryorn <at> gmail.com>

Date: Sun, 16 Jun 2013 08:49:02 UTC

Severity: normal

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#14632: closed (24.3.50; package-install-p returns nil after
 package-install)
Date: Tue, 18 Jun 2013 01:28:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 17 Jun 2013 21:27:47 -0400
with message-id <jwvtxkwnr89.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#14632: 24.3.50; package-install-p returns nil after package-install
has caused the debbugs.gnu.org bug report #14632,
regarding 24.3.50; package-install-p returns nil after package-install
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
14632: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14632
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Sebastian Wiesner <lunaryorn <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; package-install-p returns nil after package-install
Date: Sun, 16 Jun 2013 10:47:47 +0200
After "package-install", "package-installed-p" still returns nil for
the package that was just installed.  Consider:

ELISP> (package-installed-p 'nrepl)
nil
ELISP> (package-install (cdr (assq 'nrepl package-archive-contents)))
nil
ELISP> (package-installed-p 'nrepl)
nil
ELISP> (package-initialize)
t
ELISP> (package-installed-p 'nrepl)
t

Also, before "package-initialize", the newly installed "nrepl" package
still only appears as "available" in "M-x list-packages", but not as
"installable".

Even worse, dependency resolution is broken, likely as a result of this
misbehavior of "package-installed-p".  Consider "hardhat" and
"ignoramus", where "hardhat" depends on "ignoramus".  If I explicitly
install "ignoramus", "hardhat" cannot be installed afterwards:

ELISP> (package-installed-p 'ignoramus)
nil
ELISP> (package-installed-p 'hardhat)
nil
ELISP> (cdr (assq 'hardhat package-archive-contents))
[cl-struct-package-desc hardhat
                        (20130522 1243)
                        "Protect against clobbering user-writable
files [github]"
                        ((ignoramus
                          (0 6 2)))
                        single "melpa" nil]

ELISP> (package-install (cdr (assq 'ignoramus package-archive-contents)))
nil
ELISP> (package-install (cdr (assq 'hardhat package-archive-contents)))
*** Eval error ***  File exists:
/Users/swiesner/.emacs.d/elpa/ignoramus-20130522.1245/ignoramus-pkg.el
ELISP> (package-initialize)
t
ELISP> (package-installed-p 'ignoramus)
t
ELISP> (package-install (cdr (assq 'hardhat package-archive-contents)))
nil

As you can see, when installing "hardhat", package.el still attempts
to install ignoramus though this package is already installed.  Only
after re-initializing package.el, the ignoramus installation is
detected, and hardhat can be installed.

The packages mentioned in this mail are from the MELPA archive [1],
simply because I hit this bug with these packages, and was too lazy to
reproduce it with packages from the GNU ELPA archive.  I don't think
that the archive matters, though.

[1]: http://melpa.milkbox.net/


[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sebastian Wiesner <lunaryorn <at> gmail.com>
Cc: 14632-done <at> debbugs.gnu.org
Subject: Re: bug#14632: 24.3.50;
 package-install-p returns nil after package-install
Date: Mon, 17 Jun 2013 21:27:47 -0400
> After "package-install", "package-installed-p" still returns nil for
> the package that was just installed.  Consider:

ELISP> (package-installed-p 'nrepl)
> nil
ELISP> (package-install (cdr (assq 'nrepl package-archive-contents)))
> nil
ELISP> (package-installed-p 'nrepl)
> nil

Ah!  Now I see what this piece of code was for!
Should be fixed now, sorry,


        Stefan


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

Previous Next


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