# What does “You have requested package foo', but the package provides foo'.” mean?

I know what this message means in general ("do not add path names in package names"), and my question is not a duplicate of You have requested package include/foo' but the package provides foo', where the two names differ (by the path name). In my case the package names are really identical (without path name in both cases)!

I'm working on MiKTeX 2.9, with latest updates (I refreshed FNDB). I get this with the latest moderncv package (version 2.0), MWE:

\documentclass{moderncv}
\moderncvtheme{classic}
\name{Foo}{Bar}
\begin{document}
\end{document}


where I get

You have requested package moderncvheadi', but the package provides moderncvheadi'.
You have requested package moderncvbodyi', but the package provides moderncvbodyi'.


What does trigger this warning in this case and how can I solve it? Is it a bug in moderncv? The official source on https://github.com/xdanaux/moderncv looks fine to me.

its a bug in the class, looks like a recent change in the github log, can't test here, no tex, but the package name constructed by

\expandafter moderncv\romannumeral


which doesn't do the right thing \expandafter does nothing there, you can ignore the warning until it's fixed.

Lines 315 to 333 of moderncv.cls should be changed into

% loads a header variant
\begingroup\edef\x{\endgroup
\noexpand\RequirePackage[#1]{moderncvhead\ifcase#2\or i\or ii\or iii\or iv\or v\fi}%
}\x
}

% usage: \moderncvbody[<optional body option>]{<body variant number>}
\newcommand*{\moderncvbody}[2][]{%
\begingroup\edef\x{\endgroup
\noexpand\RequirePackage[#1]{moderncvbody\ifcase#2\or i\or ii\or iii\or iv\or v\fi}%
}\x
}

% usage: \moderncvfoot{<footer variant number>}
\newcommand*{\moderncvfoot}[1]{%
\begingroup\edef\x{\endgroup
\noexpand\RequirePackage{moderncvfoot\ifcase#1\or i\or ii\or iii\or iv\or v\fi}%
}\x
}


but it's not possible to add this code in a document, because the macros are already used by the class itself.

• @egreg takes pity on a user with no tex on his computer:-) Thanks I just came back here to add that and saw you'd done it:-) – David Carlisle Aug 8 '15 at 21:35
• I also fixed some missing %. ;-) – egreg Aug 8 '15 at 21:47
• Thanks for the fix! Have you guys though confirmed it worked? I am still getting the nasty warnings after changing lines 315 to 333, but maybe it's somehow just me :( – Xavier Aug 11 '15 at 4:38
• @Xavier never trust code from an untrusted source:-) I added a fix:-) – David Carlisle Aug 11 '15 at 6:51
• Shouldn't \or i\or\ii be \or i\or ii (in all three cases)? – clemens Aug 11 '15 at 8:59

This bug has been fixed in the GitHub repo, but not yet (as of 2019-04-03) on CTAN: https://www.ctan.org/pkg/moderncv version:2.0.0 date:2015-07-28