Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Syntactic Confectionery Delight
 
PerlMonks  

ppm profile failed: Can't determine best

by BrowserUk (Pope)
on Sep 21, 2012 at 22:33 UTC ( #995001=perlquestion: print w/ replies, xml ) Need Help??
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

Comment on ppm profile failed: Can't determine best
Download Code
Re: ppm profile failed: Can't determine best
by syphilis (Canon) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://995001]
Approved by toolic
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-04-20 21:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (488 votes), past polls