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

From: Philip Kaludercic <[email-masked]>
Date: Mon, 14 Aug 2023 13:54:32 +0000

Ihor Radchenko <[email-masked]> writes:

> 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.

Are you sure that this is not an issue related to org-mode?

Could you create a minimal working example to reproduce this issue, by
removing as much as possible from the repository while retaining the
issue, and then send us a tarball with the remaining files?

> 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