To find the problem, emerge erlang-21.1.1 with USE=doc, next go to /usr/share/doc/erlang-21.1.1/ and open index.html in a browser. You will find most links in the left Application Groups sidebar and below are towards ../lib/, yielding URLs such as file:///usr/share/doc/lib/compiler-7.2.5/doc/html/index.html instead of file:///usr/share/doc/erlang-21.1.1/lib/compiler-7.2.5/doc/html/index.html Unpacking the corresponding tarball from /usr/portage/distfiles in a folder yields the correct results, so using einstalldocs should be avoided here. The index file is in the doc/ folder, but it is preferable to navigate there than to have an unusable version in the root documentation folder. I enable USE=doc on some select packages, such as on this erlang package, so that I can work on my notebook when abroad.
Created attachment 581422 [details, diff] Workaround
By installing the documentation using einstalldocs but with the HTML-files specified by HTML_DOCS and setting up two symlinks, it is possible to work around this problem. Se attachment 581422 [details, diff]
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=043c2bbc72cfd2f22cbd3cf58786dd3262d54ae3 commit 043c2bbc72cfd2f22cbd3cf58786dd3262d54ae3 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-02-26 21:45:51 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-02-26 21:46:03 +0000 dev-lang/erlang: fix USE=doc dirs, bug #684376 Reported-by: Ciprian Ciubotariu Closes: https://bugs.gentoo.org/684376 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-lang/erlang/erlang-22.2.7-r1.ebuild | 161 ++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+)
In erlang-22.2.7-r1 I tried to undo dorectory reshuffling in einstalldocs. Please give it a try.
I have installed your version and the docs look consistent again. Thanks!