From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=86var_?= =?UTF-8?Q?Arnfj=C3=B6r=C3=B0?= Bjarmason Newsgroups: gmane.emacs.bugs Subject: bug#6805: 24.0.50; package--dir assumes that Emacs is installed Date: Sun, 8 Aug 2010 20:55:15 +0000 Message-ID: References: <87sk2ovo7e.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1281315881 6027 80.91.229.12 (9 Aug 2010 01:04:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Aug 2010 01:04:41 +0000 (UTC) Cc: 6805@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 09 03:04:36 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OiGmo-00057l-Os for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Aug 2010 03:04:32 +0200 Original-Received: from localhost ([127.0.0.1]:45166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiGmn-0006U1-HZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Aug 2010 21:04:17 -0400 Original-Received: from [140.186.70.92] (port=43629 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiD6d-0008Fs-Pg for bug-gnu-emacs@gnu.org; Sun, 08 Aug 2010 17:08:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OiD6b-0007r8-Kk for bug-gnu-emacs@gnu.org; Sun, 08 Aug 2010 17:08:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56108) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiD6b-0007r3-Ha for bug-gnu-emacs@gnu.org; Sun, 08 Aug 2010 17:08:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OiCyR-0004Y6-Tq; Sun, 08 Aug 2010 17:00:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=86var_?= =?UTF-8?Q?Arnfj=C3=B6r=C3=B0?= Bjarmason Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Aug 2010 21:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6805 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6805-submit@debbugs.gnu.org id=B6805.128130116917459 (code B ref 6805); Sun, 08 Aug 2010 21:00:03 +0000 Original-Received: (at 6805) by debbugs.gnu.org; 8 Aug 2010 20:59:29 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCxs-0004XY-9h for submit@debbugs.gnu.org; Sun, 08 Aug 2010 16:59:28 -0400 Original-Received: from mail-iw0-f172.google.com ([209.85.214.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiCtB-0004Un-7H for 6805@debbugs.gnu.org; Sun, 08 Aug 2010 16:54:38 -0400 Original-Received: by iwn36 with SMTP id 36so2937441iwn.3 for <6805@debbugs.gnu.org>; Sun, 08 Aug 2010 13:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=OpqbuDtc3MNLwyGmwYM+yZJrYDDv8Y5KvLAgVSnuweY=; b=g2caHmNNph+pOaJFq3Kk1/agkVb3o8irQ0/CYWnWMEwLaWjD3L9RqNe7GJqUg+lavP jses7r1DRjhCXfd/BaZzrYQMhO3/8B68oQAWzp8/x1SoT1r1O6V7iesCxJRJW1b7QBXs rLNjnkHpZ04Pq0PMXz/3B9VAvhZtSeitjgSCI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=u/GfBqU1sITBlsy25BabTqpw9mDzSFtBULs3fQuv8nvEsl+VJDsJaPGQuhvBz/mB9D q5oo9HxuPDEdyYcc5G25raYQBEEhs1h3JiwpAKYwxtylyOJTwFUgfz/2bdWn8NZQYRh1 F52d13j1pDj3EM0gUf3UGlRnU7xHajReE7vpg= Original-Received: by 10.231.149.12 with SMTP id r12mr17960293ibv.185.1281300915910; Sun, 08 Aug 2010 13:55:15 -0700 (PDT) Original-Received: by 10.231.186.226 with HTTP; Sun, 8 Aug 2010 13:55:15 -0700 (PDT) In-Reply-To: <87sk2ovo7e.fsf@stupidchicken.com> X-Mailman-Approved-At: Sun, 08 Aug 2010 16:59:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 08 Aug 2010 17:00:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sun, 08 Aug 2010 21:04:10 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39328 Archived-At: On Sun, Aug 8, 2010 at 20:33, Chong Yidong wrote: > =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason writes: > >> When I compile Emacs from Git and run it without doing "make install" I >> run into this in package.el: >> >> =C2=A0 =C2=A0 (unless pkg-dir >> =C2=A0 =C2=A0 =C2=A0 (error "Internal error: could not find directory fo= r %s-%s" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0name version-str)) > > I can't reproduce this. =C2=A0I run Emacs in place without `make install'= , > and have not encountered any such error. =C2=A0Could you provide a precis= e > 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 packag= e-1.0 >> It's failing that assertion because package--dir assumes that Emacs is >> already installed: >> >> =C2=A0 =C2=A0 package-directory-list is a variable defined in `package.e= l'. >> =C2=A0 =C2=A0 Its value is >> =C2=A0 =C2=A0 ("/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.