all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* package-installed-p broken
@ 2013-06-15 19:01 Sebastian Wiesner
  2013-06-16  8:50 ` Sebastian Wiesner
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Wiesner @ 2013-06-15 19:01 UTC (permalink / raw)
  To: emacs-devel

Hello,

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 appears as "available", but not as "installed" in "M-x
list-packages".

Even worse, dependency resolution is now 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.

The packages mentioned in this mail are from the MELPA archive.

Sincerely,
Sebastian Wiesner



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: package-installed-p broken
  2013-06-15 19:01 package-installed-p broken Sebastian Wiesner
@ 2013-06-16  8:50 ` Sebastian Wiesner
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Wiesner @ 2013-06-16  8:50 UTC (permalink / raw)
  To: emacs-devel

Bug reported at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14632



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-16  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-15 19:01 package-installed-p broken Sebastian Wiesner
2013-06-16  8:50 ` Sebastian Wiesner

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.