Open jjatria opened 5 years ago
Prereqs for an alienfile are inherently dynamic, and may change over time. This is to keep system integrators happy (and generally peoples who do not need to do a source install). Likely this is because you upgraded Alien::Build
since the last time the install step for this alienfile
was run, as we recently changed the default decode plugin to use pure-perl Mojo::DOM58
instead of the XS based HTML::Parser
. Although other things can cause it, like if the system libs are uninstalled etc. Normally any changes to the prereqs only matter at configure time, and most modern cpan clients will make sure they are installed. af
is mainly intended as an Alien author tool, but it can tell you what prereqs are needed by using the af missing
and af requires
commands. You can use this short-cut:
af missing | cpanm
to install anything that is missing.
--dry-run
just installs into a temp directory, so no share directories are overwritten (it's functionally equivalent to af install --prefix=/tmp/xxxxxxxx
(where xxxxxxxx
is picked at random). af
itself doesn't try to (directly) install any prereqs. It does have the capability to compute the prereqs for just the alienfile. It might be a nice feature to optionally install prereqs as well, but I'm hesitant to replicate functionality in cpanm
et. al. If it were to to do so it should call a dedicated cpan client.
The af missing | cpanm
example makes sense, but in that case maybe the error message can be tweaked to point people in the right direction. I'm thinking in the end maybe something like what dzil
does: identify that some requirements are not met, and tell the user how to fix it.
As it stands, when I ran into this problem it wasn't clear whether this was an error in af
itself, something that I as an alienfile
developer should worry about, or some other problem somewhere else.
yeah fair.
Need a method (maybe in Alien::Build
, maybe not) that computes a list of missing prereqs for a given $phase
and print them out with an appropriate diagnostic and exit 2
instead of using die.
I suspect that this is not really an issue with
af
per-se, but with the Download plugin (so I could close this and open one there), but I figured I might as well post it here, since this is how I came across this issue:When trying an
install --dry-run
, I encountered the following error:It looks like something is falling back on something that depends on Mojo::DOM58, and that should be declared as a dependency.