http://www.perlmonks.org?node_id=995001

BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:

Best what?

In short, I am trying to use ppm profile restore \5.10.profile to restore all the packages I have installed in my 5.10 installation into my 5.14 installation.

The command fails with the subject error message, and I can't locate any salient information on-line. Anyone any ideas?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong

Replies are listed 'Best First'.
Re: ppm profile failed: Can't determine best
by syphilis (Archbishop) on Sep 21, 2012 at 23:15 UTC
    The error comes from lib\ActivePerl\PPM\Package.pm but I haven't tried to make sense of what that particular code is trying to do. Maybe modify the best() sub to print out the contents of @dunno - which might provide you with the hint you need.

    (I guess you already know that, for your particular exercise, you need to modify the "ACTIVEPERL VERSION" and "REPOSITORY HREF" entries in the profile file that 5.10 produced.)

    Cheers,
    Rob
      (I guess you already know that, for your particular exercise, you need to modify the "ACTIVEPERL VERSION" and "REPOSITORY HREF" entries in the profile file that 5.10 produced.)

      I didn't know that -- thanks for the tip -- but it made no difference.

      It turns out that -- in their infinite wisdom -- they decide to sort the packages before downloading them. And their sort comparator doesn't just compare names, but also versions, features and release dates. But it sometime decides that it doesn't know how to order two packages and so, just dies -- with the ever so helpful "Can't find best".

      Stick return -1; into the top of their compare() function and ... off it merry well trots.

      Reading between the lines -- you have to as there is no further explanation -- it might be that the ordering that results from this hack will cause a later package install to overwrite an earlier installed, but later versioned, dependency; but better than than just giving up.

      I really do wonder sometimes...


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      RIP Neil Armstrong

        I didn't know that

        Actually, I was just *guessing* that "restoring" ActivePerl-5.14 from a profile file that listed the 5.10 values for ACTIVEPERL VERSION and the repository HREF would cause problems. PERL VERSION and PPM VERSION (which I failed to notice at my first glance at a generated profile file) would also be set to the 5.10 values instead of the 5.14 ones.

        Cheers,
        Rob