I just upgraded from texlive 2021 -> texlive 2023. After the upgrade documents that use the 'memoir' class no longer compile. ! LaTeX Error: File `xpatch.sty' not found. Reproducible: Always Steps to Reproduce: Create and compile a doc that uses memoir class : $ cat > test.tex << EOF > \documentclass[a4paper]{memoir} \begin{document} hello this is a test \end{document} EOF $ xelatex test.tex Actual Results: This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023 Gentoo Linux) (preloaded format=xelatex) restricted \write18 enabled. entering extended mode (./test.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-01-22> (/usr/share/texmf-dist/tex/latex/memoir/memoir.cls Document Class: memoir 2024/01/26 v3.8.2 configurable book, report, article doc ument class ! LaTeX Error: File `xpatch.sty' not found. entering extended mode (./test.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-01-22> (/usr/share/texmf-dist/tex/latex/memoir/memoir.cls Document Class: memoir 2024/01/26 v3.8.2 configurable book, report, article doc ument class ! LaTeX Error: File `xpatch.sty' not found. Expected Results: Output written on test.pdf (1 page). See /usr/share/texmf-dist/tex/latex/memoir/memoir.cls memoir requires xpatch, but it isn't finding it. My texlive use flags are app-text/texlive-2023::gentoo USE="graphics png truetype xetex"
xpatch is part of latexextra, while memory is part of latexrecommended, therefore I would assume that xpatch is not a hard dependency of memoir. Does the error go away if you install texlive-latexextra (or, alternatively, enable USE=extra on app-text/texlive)?
> would assume that xpatch is not a hard dependency of memoir I don't think this is a valid assumption. If A simply does not work without B then B is a hard dependancy of A. A soft dependancy is where A will work without B, but you might be missing features, or not work in some special cases. The case we have here is that memoir does not work at all without xpatch. This is a hard dependancy. As per line 44 of the memoir class :- \RequirePackage{xpatch} This is not within a conditional block. Also my test above proves that, it is a simple 'hello world' which does not use any features of memoir but simply is created as that class type. It does not work. > Does the error go away if you install texlive-latexextra Yes that is the workaround i am currently using.
(In reply to Graham from comment #2) > > would assume that xpatch is not a hard dependency of memoir > > I don't think this is a valid assumption. Well, the assumption was based on the fact that memoir is part of latexrecommended and xpatch is part of latexextra. Such a split would only make sense if memoir is usable, although with limited functionality, without xpatch. However, as you showed, this does not seem to be the case. I wonder if this is an upstream bug, as memoir also does not declare a "depend xpatch" in its tlpobj.