From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#63625: 29.0.90; package-install inserts package directory into load-path twice. Date: Mon, 22 May 2023 10:55:13 +0200 Message-ID: <871qj8lp8u.fsf@gmail.com> References: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14154"; mail-complaints-to="usenet@ciao.gmane.io" Cc: todd smith To: 63625@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 22 10:56:28 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q11LA-0003W1-F2 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 May 2023 10:56:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q11Km-0008RC-33; Mon, 22 May 2023 04:56:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q11Kk-0008Qy-Tl for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 04:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q11Kk-0002J3-Kp for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 04:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q11Kk-0006pi-Gw for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 04:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 May 2023 08:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63625 X-GNU-PR-Package: emacs Original-Received: via spool by 63625-submit@debbugs.gnu.org id=B63625.168474572326021 (code B ref 63625); Mon, 22 May 2023 08:56:02 +0000 Original-Received: (at 63625) by debbugs.gnu.org; 22 May 2023 08:55:23 +0000 Original-Received: from localhost ([127.0.0.1]:33512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11K6-0006lb-Vq for submit@debbugs.gnu.org; Mon, 22 May 2023 04:55:23 -0400 Original-Received: from mail-wm1-f54.google.com ([209.85.128.54]:56668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11K5-0006kh-Bq for 63625@debbugs.gnu.org; Mon, 22 May 2023 04:55:22 -0400 Original-Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-3f42c865535so58466765e9.1 for <63625@debbugs.gnu.org>; Mon, 22 May 2023 01:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684745715; x=1687337715; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lGmfpHeJ4gbz3RYNpgqKNTUAP3z+dQq6wn4nyw/mq2A=; b=a9+aLTjWIJoP+OYZp6jASWwWtRJWG6JXY5tyAEpf2cmsfzi+QNMEF0js2PB0JDTggG 0CL/dmIVLYqHiM0lVkkjwpebwydTJ95BDAjzbjwgGW5p+JloUgz9JdcvLcwXax1P1cFd nd1qZX0Kn3bTCGrFb1Mj/swVYVpMTSfjRGhSaSefeAoDvHUhKCFvWG1A7/z53hGvvWwQ 0ilMewKczQYwv3MnkzV8nWNh32eUv7qDiXSYIN4ZRdV3W3eWJYnRRegI2NXIh4juhu7E QnSEKQKBw+ZVcwVfV/el00daTEb4DyqTxh+7+g+e5gMHzavAfNUXwhL86vocANeymmtl FniQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684745715; x=1687337715; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lGmfpHeJ4gbz3RYNpgqKNTUAP3z+dQq6wn4nyw/mq2A=; b=f5B5c/NRGIGPCvsY5167WKxdT+1WmUHOva9so5x9ck3wXk+FjmpJWDsIY6VGjLa7/P 7qXZOSzoeMrhF+yvttlCDgSXm0KrC7avye3+EUr0lUMmUDb7mBPkh4InGOcNJqxwJ5K6 duhMT2O5MSvlYlN7QITGjwoPeqwD57qGVXr2uBztVuevsR/aNV4WCQuZpZerfJ9G+Qkc M3XlKbHYJySTp8PskAHVkZkgeYMnFT4oD5TFi6yEjHKv2odcPvC94J0bGjz5Ol9pwaJm GoDH+eegfpZkiRARBva6iAGv3ZgecdPN+4o0nLGlOs1BJtM8MFw8CueTCzMQJpTh46V5 p5iw== X-Gm-Message-State: AC+VfDzx63u9NldVnBgIh8iMbHIaqmplGFuBLfLqi4pNkxP1DlorQYYe IrxfH9K1mJ1J4w0cJSe8NP31SXWIY68= X-Google-Smtp-Source: ACHHUZ4pv2Cb3S96Un3XbBBUxpFU/D+58lc5mOflDUK2+vjZFhpD9gECvKOINeDb/mA44LEdQXnSFA== X-Received: by 2002:a05:600c:ad0:b0:3f4:23df:c681 with SMTP id c16-20020a05600c0ad000b003f423dfc681mr6341415wmr.12.1684745714800; Mon, 22 May 2023 01:55:14 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id a5-20020a05600c224500b003f5ffba9ae1sm6294130wmm.24.2023.05.22.01.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 01:55:14 -0700 (PDT) In-Reply-To: <4ACD9E26-B5A6-412E-8DFC-C09C05A4EACD@mac.com> (todd smith via's message of "Sat, 20 May 2023 16:45:34 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262136 Archived-At: >>>>> On Sat, 20 May 2023 16:45:34 -0500, todd smith via "Bug reports for G= NU Emacs, the Swiss army knife of text editors" sai= d: Todd> 1) trash ~/.emacs.d ;; i.e. remove .emacs.d (optional) Todd> 2) emacs -Q (the -Q isn=E2=80=99t necessary, I=E2=80=99ve obse= rved the problem every way that I=E2=80=99ve started emacs) Todd> 3) in *scratch* buffer, type and execute "(package-insert =E2=80= =98ack)=E2=80=9D (or run M-x package-install or install from M-x list= -packages. Todd> Any and every package I=E2=80=99ve installed produces the problem= , ack is just easy to type) Todd> 4) C-h v load-path (that is, run describe-variable on load-pa= th to see its value, note the first two entries) Todd> Its value is Todd> ("/Users/todd/.emacs.d/elpa/ack-1.11" Todd> "/Users/todd/.emacs.d/elpa/ack-1.11/" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/vc" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/use-package" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/url" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/textmodes" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/progmodes" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/play" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/org" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/nxml" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/net" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/mh-e" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/mail" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/leim" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/language" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/international" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/image" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/gnus" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/eshell" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/erc" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/emulation" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/emacs-lisp" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/cedet" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/calendar" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/calc" Todd> "/opt/homebrew/Cellar/emacs-plus@29/29.0.60/share/emacs/29.0.90/l= isp/obsolete") This is because we didn=CA=BCt respect DRY. package.el should use the package support of `loaddefs-generate', but that doesn=CA=BCt expose the requisite feature of `loaddefs-generate--rubric' (maybe on master it does). diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 78017b77677..31e5e0809a8 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1107,8 +1107,9 @@ package-generate-autoloads ;; Add the directory that will contain the autoload file to ;; the load path. We don't hard-code `pkg-dir', to avoid ;; issues if the package directory is moved around. + (directory-file-name (or (and load-file-name (file-name-directory load-file-name)) - (car load-path))))) + (car load-path)))))) (let ((buf (find-buffer-visiting output-file))) (when buf (kill-buffer buf))) auto-name)) Robert --=20