Subject: bug#65286: 30.0.50; package-install-file for built-in package

From: Ihor Radchenko <[email-masked]>
Date: Mon, 14 Aug 2023 11:55:11 +0000

Hi,

I am trying to figure out ways to deal with mixing Org versions.
(https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62762)

In my tests, I was trying to utilize M-x package-install-file to emulate
ELPA installation. And I think that I stumbled upon a bug in this
command.

Recipe:
1. Remove default elpa directory
2. cd /tmp; git clone --depth 1 --branch feature/provide-version https://git.sr.ht/~yantar92/org-mode
3. cd org-mode/lisp
4. emacs -Q
5. M-x org-version
6. M-x package-install-file <RET> /tmp/org-mode/lisp <RET>
7. Observe

ob-gnuplot.el:45:2: Error: Recursive load: "/home/yantar92/.emacs.d/elpa/org-9.7pre/org-element.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/org.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/org-element.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/org.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/org-element.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/org.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/org-element.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/org.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/org-element.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/ox.el", "/home/yantar92/.emacs.d/elpa/org-9.7pre/ox-ascii.el"

The same does not happen if we skip step (4).

Also, keeping elpa directory around between the tests triggers various failures.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-08-13 built on localhost
Repository revision: bfde3a4482ce7775f00a17b597daa1b188ef0d43
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Gentoo Linux

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>