in reply to When cpan returns the dreaded "won't install without force"

I think that it certainly would be an improvement if the failed installation session would end with a synopsis of exactly why the process failed ... and if there were routinely a log or transcript.   The output of any installation is extremely noisy.

However, it would not be particularly easy to do this, because packages vary in age as well as in the completeness of their designs, all of which are self-contributed by whomever owns the package (or owned it at the time).   There is no single-standard.   There’s even more than one module-building framework:   when improvements to that process were introduced, package maintainers gradually over time (maybe) moved to it, but old packages that still work just fine were not re-written.   The quality-assurance such as it is (and usually, it is just fine) is self-regulated by the CPAN community.

I have a few particular cases where the “won’t install without” scenario appears in some of the deployments that I maintain:

  1. One package requires a third-party C library, a standard one, but it assumes that the library exists.   (Perhaps this is because there is no one single known-good way to check for it on all systems?)   If it’s not there, you don’t get a prerequisite-error:   you get a nasty failure to compile, with lots of oily parts on the runway when the whole thing finally skids to a stop on the tarmac.
  2. Another package is similar:   the library has been updated and the package requires the newer one, but older deployments of it do exist out there.
  3. CPAN package re-designs have caused issues.   You can design your package any way you want to.   Someone else’s package, perhaps unbeknownst to you, uses a package feature that its owner now considers to be deprecated.   Or a test-script in your installation sequence still refers to it.   There is one package that I use which at this moment must be forced.   (Sure, I offered a patch to the test.)
  4. Windows-environment users are very familiar with the scenario where they want to use a package that was written by a person who only has access to Linux or Unix, and who therefore is not in a position to make adjustments to suit other environments ... and there are a great many environments.

“Missing and unrealized prerequisites,” by-the-by, are a definite possibility to be dealt-with in the field.   Success of an installation depends not only upon you correctly specifying all of the pre-requisites and co-requisites of your package, but that all of them have done the same and that they forever continue to do so.   To some degree, manifests and so-forth are hand written.   If a requisite is left-out but your system does have it, you don’t necessarily recognize the existence of the problem.   On top of this, there are a few “co-dependency paradoxes” which actually oblige you to force installation of package A, in order that you can now install package B, in order that you can now properly re-install package A.   You can see this clearly if you have to deal with a scenario that rarely occurs:   installing a Perl application on an absolutely-naked system i.e. step #1 is compiling the Perl executable from scratch and so-on.   And your task is to construct an absolutely hands-free installer/updater for that case.   Attempt that, and you will find some amount of grief despite everyone else’s earnest efforts.


Comment on Re: When cpan returns the dreaded "won't install without force"
Re^2: When cpan returns the dreaded "won't install without force"
by Anonymous Monk on Mar 18, 2013 at 14:04 UTC

    I think that it certainly would be an improvement ...

    Yeah, you can get that if you use cpanp or cpanm or install CPAN::Reporter and flip on verbose and/or logging and/or debug mode

    You either head or tail the log, and you'll see the most important message

Re^2: When cpan returns the dreaded "won't install without force"
by Intrepid (Deacon) on Mar 23, 2013 at 03:56 UTC

    Note: this reply is mainly going to be a redirect to a new node that takes the discussion from this point. Expect an update soon. Withhold critical judgement until then, please.

    sundialsvc4 wrote (the quotations may be slightly adjusted to add my emphasis or to enhance clarity if I thought it could be improved):

    I have a few particular cases where the “won’t install without” scenario appears in some of the deployments that I maintain:

    1. One package requires a third-party C library, a standard one, but it assumes that the library exists.   (Perhaps this is because there is no one single known-good way to check for it on all systems?)   If it’s not there, you don’t get a prerequisite-error:   you get a nasty failure to compile, with lots of oily parts on the runway when the whole thing finally skids to a stop on the tarmac.
    2. Another package is similar:   the library has been updated and the package requires the newer one, but older deployments of it do exist out there.

    “Missing and unrealized prerequisites,” by-the-by, are a definite possibility to be dealt-with in the field.

    As to the last, certainly, they are. But as an overall generalization this is far less likely when using the cpan clients to install modules. The clients prompt the user when installation of the module with unfulfilled prereqs has been requested. Not to belabor the point but this is not how the OP reported the pattern of events. No mention was made of cpan prompting her as Makefile was built-which is long before cpan states (after the test run) that it   won't install without force.

    These are good points and are scenarios that are familiar to many Perlmonks. The 2 selected statements are both about external dependencies (where “external” in this context means provisioned from outside the CPAN installer universe). Such being the case, and knowing how sticky this whole area can be, I've created a new node [at 1025019 - Dei ex machina - State of the External Dependency Arts] in which to carry on this discussion. The focus of the new write-up will be that indicated by sundialsvc4's speculation Perhaps this is because there is no one single known-good way to check for it on all systems?

    Updated 2013-03-23 GMT

Re^2: When cpan returns the dreaded "won't install without force"
by Lady_Aleena (Chaplain) on Mar 24, 2013 at 05:25 UTC

    sundialsvc4, for any installation it would be nice to have an easy to read report, however, Windows command prompt is not the best place to read those reports. No matter how messy they are, a text editor would be a better environment to read those reports. I can line wrap in my text editor, so lines could be as long as they want to be, I just make them wrap so they do not force to to scroll right to read them. I went to copy a test report to write up a bug report, and one line just went on and on and on to the right, and I got so flustered I gave up trying to copy the report or write the bug report.

    I know the reasons for installations are varied, but having to read the test reports in the command prompt window on Windows is a pain.

    Have a cookie and a very nice day!
    Lady Aleena