unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6805: 24.0.50; package--dir assumes that Emacs is installed
@ 2010-08-05 18:07 Ævar Arnfjörð Bjarmason
  2010-08-08 20:33 ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-05 18:07 UTC (permalink / raw)
  To: 6805

When I compile Emacs from Git and run it without doing "make install" I
run into this in package.el:

    (unless pkg-dir
      (error "Internal error: could not find directory for %s-%s"
	     name version-str))

It's failing that assertion because package--dir assumes that Emacs is
already installed:

    package-directory-list is a variable defined in `package.el'.
    Its value is
    ("/usr/local/share/emacs/24.0.50/site-lisp/elpa"
"/usr/local/share/emacs/site-lisp/elpa")

It shouldn't do that. Usually Emacs runs fine if you build it and don't
install it.

In GNU Emacs 24.0.50.2 (i686-unknown-kfreebsd7.3-gnu, GTK+ Version 2.20.1)
 of 2010-08-05 on k
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure  'CFLAGS=-O0 -ggdb3''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  eldoc-mode: t
  icomplete-mode: t
  iswitchb-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x b M <return> M-< C-h f p a c k a g <tab> a c <tab>
- 1 <tab> <return> C-x o <tab> <return> C-x 1 C-n C-n
C-n C-n C-n C-x b <return> C-x k C-x b <return> C-x
b <return> C-p C-p C-e M-b M-b M-b M-b M-b C-b C-SPC
C-e C-b C-b M-w C-x b * <backspace> s c r <return>
C-y C-a a M-f C-/ C-e M-b M-b M-b " M-d p a c k a g
e " C-x b M <return> C-x b <return> C-f C-k " 1 ' <backspace>
. 0 " ) C-x C-e C-x b <return> C-x k C-x b <return>
M-< C-s p a c k a g e - - d i r C-n C-n M-f M-f M-f
M-f C-f C-f C-h v <return> M-b M-b C-h v <return> C-x
1 C-h v <return> C-x o C-x o C-e M-b M-b C-h v <return>
C-x 1 M-x r e p o <tab> o <tab> <backspace> r t <tab>
<return> p a c k a g e - - d i r SPC s a s <backspace>
<backspace> <backspace> a s s u m e s SPC t h a t SPC
E m a c s SPC i s SPC i n s t a l l e d <return> C-p
C-p C-p C-p C-p M-f M-f a b C-f M-d g m a i l C-c C-s
n C-g C-x k <return> n C-x b b <backspace> b <return>
C-x b m a i <return> C-x k y C-n M-x r e p o <tab>
r <tab> <return>

Recent messages:
Checking 87 files in /home/avar/g/emacs/lisp/calc...
Checking 43 files in /home/avar/g/emacs/lisp/obsolete...
Checking for load-path shadows...done
Convert non-ASCII letters to hexadecimal? (y or n)
Send this bug report to the Emacs maintainers? (y or n)
Quit
Buffer *mail to bug-gnu-emacs@gnu.org* modified; kill anyway? (y or n)
Please answer y or n.  Buffer *mail to bug-gnu-emacs@gnu.org*
modified; kill anyway? (y or n)
Buffer *mail to bug-gnu-emacs@gnu.org* modified; kill anyway? (y or n)
Making completion list...

Load-path shadows:
/home/avar/g/elisp/nopaste/nopaste hides /home/avar/g/elisp/_local/nopaste
/home/avar/g/elisp/shellarchive/find-cmd hides /home/avar/g/emacs/lisp/find-cmd
/home/avar/g/elisp/css-mode hides /home/avar/g/emacs/lisp/textmodes/css-mode
/home/avar/g/elisp/cperl-mode/cperl-mode hides
/home/avar/g/emacs/lisp/progmodes/cperl-mode

Features:
(shadow sort gnus-util mail-extr message sendmail rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug pp multi-isearch vc-git eldoc find-func help-mode easymenu view
package edit-server derived server slime-autoloads easy-mmode cc-styles
cc-align cc-engine cc-vars cc-defs regexp-opt byte-opt warnings bytecomp
byte-compile advice help-fns advice-preload edmacro kmacro icomplete
iswitchb paren tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)





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

* bug#6805: 24.0.50; package--dir assumes that Emacs is installed
  2010-08-05 18:07 bug#6805: 24.0.50; package--dir assumes that Emacs is installed Ævar Arnfjörð Bjarmason
@ 2010-08-08 20:33 ` Chong Yidong
  2010-08-08 20:55   ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2010-08-08 20:33 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: 6805

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> When I compile Emacs from Git and run it without doing "make install" I
> run into this in package.el:
>
>     (unless pkg-dir
>       (error "Internal error: could not find directory for %s-%s"
> 	     name version-str))

I can't reproduce this.  I run Emacs in place without `make install',
and have not encountered any such error.  Could you provide a precise
description of the error, such as the error message shown in echo area?

> It's failing that assertion because package--dir assumes that Emacs is
> already installed:
>
>     package-directory-list is a variable defined in `package.el'.
>     Its value is
>     ("/usr/local/share/emacs/24.0.50/site-lisp/elpa"
> "/usr/local/share/emacs/site-lisp/elpa")

It should not matter if these directories do not exist, but your bug
report does not provide enough information to tell for sure.





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

* bug#6805: 24.0.50; package--dir assumes that Emacs is installed
  2010-08-08 20:33 ` Chong Yidong
@ 2010-08-08 20:55   ` Ævar Arnfjörð Bjarmason
  2010-08-08 22:02     ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-08 20:55 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 6805

On Sun, Aug 8, 2010 at 20:33, Chong Yidong <cyd@stupidchicken.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> When I compile Emacs from Git and run it without doing "make install" I
>> run into this in package.el:
>>
>>     (unless pkg-dir
>>       (error "Internal error: could not find directory for %s-%s"
>>            name version-str))
>
> I can't reproduce this.  I run Emacs in place without `make install',
> and have not encountered any such error.  Could you provide a precise
> description of the error, such as the error message shown in echo area?

On a fresh Emacs checkout from git://repo.or.cz/emacs.git on both
Debian GNU/Linux testing and Debian GNU/kFreeBSD unstable doing:

    mkdir ~/g
    git clone git://repo.or.cz/emacs.git &&
    cd emacs &&
    make -j 10 bootstrap &&
    make

followed by:

    src/emacs

will display, in the echo area:

    "Internal error: could not find directory for package-1.0"

And in *Messages*:

    package-activate-1: Internal error: could not find directory for package-1.0

>> It's failing that assertion because package--dir assumes that Emacs is
>> already installed:
>>
>>     package-directory-list is a variable defined in `package.el'.
>>     Its value is
>>     ("/usr/local/share/emacs/24.0.50/site-lisp/elpa"
>> "/usr/local/share/emacs/site-lisp/elpa")
>
> It should not matter if these directories do not exist, but your bug
> report does not provide enough information to tell for sure.

I've just glanced at the code, but it seems that it does
matter. package-activate-1 has this:

    (defun package-activate-1 (package pkg-vec)
      (let* ((name (symbol-name package))
             (version-str (package-version-join (package-desc-vers pkg-vec)))
             (pkg-dir (package--dir name version-str)))
        (unless pkg-dir
          (error "Internal error: could not find directory for %s-%s"
                 name version-str)

Which calls:

    (defun package--dir (name version-string)
      (let* ((subdir (concat name "-" version-string))
             (dir-list (cons package-user-dir package-directory-list)

package--dir is searching through (cons package-user-dir
package-directory-list), whose value on my system is:

    ("~/.emacs.d/elpa" "/usr/local/share/emacs/24.0.50/site-lisp/elpa"
"/usr/local/share/emacs/site-lisp/elpa")

None of those directories exist on my system. Perhaps you can
reproduce this issue if you delete your ~/.emacs.d/elpa directory?

Or maybe something is wrong on my system. I haven't looked deeply into
this bug, and I'd be happy to supply further info needed to solve it.





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

* bug#6805: 24.0.50; package--dir assumes that Emacs is installed
  2010-08-08 20:55   ` Ævar Arnfjörð Bjarmason
@ 2010-08-08 22:02     ` Chong Yidong
  2010-08-08 22:49       ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2010-08-08 22:02 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: 6805

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On a fresh Emacs checkout from git://repo.or.cz/emacs.git on both
> Debian GNU/Linux testing and Debian GNU/kFreeBSD unstable doing:
>
>     mkdir ~/g
>     git clone git://repo.or.cz/emacs.git &&
>     cd emacs &&
>     make -j 10 bootstrap &&
>     make
>
> followed by:
>
>     src/emacs
>
> will display, in the echo area:
>
>     "Internal error: could not find directory for package-1.0"

I don't see any error message with the Bzr repository; I don't know
about the unofficial git repository you are using.  You could try with
an empty .emacs file and no .emacs.d directory.





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

* bug#6805: 24.0.50; package--dir assumes that Emacs is installed
  2010-08-08 22:02     ` Chong Yidong
@ 2010-08-08 22:49       ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-08 22:49 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 6805

On Sun, Aug 8, 2010 at 22:02, Chong Yidong <cyd@stupidchicken.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> On a fresh Emacs checkout from git://repo.or.cz/emacs.git on both
>> Debian GNU/Linux testing and Debian GNU/kFreeBSD unstable doing:
>>
>>     mkdir ~/g
>>     git clone git://repo.or.cz/emacs.git &&
>>     cd emacs &&
>>     make -j 10 bootstrap &&
>>     make
>>
>> followed by:
>>
>>     src/emacs
>>
>> will display, in the echo area:
>>
>>     "Internal error: could not find directory for package-1.0"
>
> I don't see any error message with the Bzr repository; I don't know
> about the unofficial git repository you are using.  You could try with
> an empty .emacs file and no .emacs.d directory.

I should have tried with -Q, it turns out that I had this in my ~/.emacs:

    (setq package-activated-list nil)

I was defining it because a package I was using used it, but I hadn't
tried my ~/.emacs on Emacs trunk, so it wasn't compatible with a Emacs
that has package.el built-in.

Sorry about the noise. I think this bug can be closed.





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

end of thread, other threads:[~2010-08-08 22:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 18:07 bug#6805: 24.0.50; package--dir assumes that Emacs is installed Ævar Arnfjörð Bjarmason
2010-08-08 20:33 ` Chong Yidong
2010-08-08 20:55   ` Ævar Arnfjörð Bjarmason
2010-08-08 22:02     ` Chong Yidong
2010-08-08 22:49       ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).