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

I've noticed a problem that seems to have gone from bad to worse lately. ActiveState's "ppm" (Perl Package Manager) utility seems to have a couple of problems.

I frequently grab a list of module upgrade candidates like this:

perl -e "print grep !/up to date/, `ppm upgrade`" > upgrade.txt

That creates a text file containing a list only of those modules that are considered not up-to-date; those modules for which PPM recognizes a newer version available. But therein exists the first problem. In many cases, the modules identified are reported like this:

CGI-Enurl 1.07: new version 1.07 available in ActiveState Package Repo +sitory

See a problem there? Note the version numbers. This problem exists for at least five of the modules I have installed.

But wait, that's not all. The next problem is that even those modules that are correctly identified as needing to be upgraded (those for which there is a newer version available) sometimes don't get upgraded, even if I use the -precious option. To upgrade all modules with newer versions available I'll type this command:

ppm upgrade -install -precious

I do have to pay attention to the prompts since some modules appear on multiple servers, but I'm careful to always select the server displaying the most up-to-date version. But even after running this command, I'll find that some of the modules haven't been upgraded. Here's a dump of what PPM considers to be "in need of upgrade" after having executed a ppm upgrade -install -precious command:

Acme-Time-Baby 2.106: new version 2.106 available in ActiveState Packa +ge Repository CGI-Application 4.01: new version 4.03 available in ActiveState Packag +e Repository CGI-Enurl 1.07: new version 1.07 available in ActiveState Package Repo +sitory Class-Accessor 0.19: new version 0.22 available in ActiveState Package + Repository Class-DBI 0.96: new version v3.6 available in ActiveState Package Repo +sitory Class-Trigger 0.09: new version 0.10 available in ActiveState Package +Repository Compress-Zlib 1.34: new version 1.41 available in BdP HTML-Strip 1.02: new version 1.04 available in ActiveState Package Rep +ository HTML-Template 2.7: new version 2.7 available in ActiveState Package Re +pository HTML-Tidy 1.05_02: new version 1.06 available in BdP Heap-Simple 0.09: new version 0.09 available in ActiveState Package Re +pository Heap-Simple-Perl 0.09: new version 0.10 available in ActiveState Packa +ge Repository Ima-DBI 0.33: new version 0.34 available in ActiveState Package Reposi +tory Image-Magick 6.2: new version 6.2.4 available in BdP Mail-POP3Client 2.15: new version 2.17 available in ActiveState Packag +e Repository Net-DNS 0.51: new version 0.53 available in ActiveState Package Reposi +tory Net-SCP 0.06: new version 0.07 available in ActiveState Package Reposi +tory Net-SSH 0.07: new version 0.08 available in ActiveState Package Reposi +tory PadWalker 0.10: new version 0.13 available in ActiveState Package Repo +sitory String-ShellQuote 1.02: new version 1.03 available in ActiveState Pack +age Repository Tree-Binary 0.06: new version 0.07 available in ActiveState Package Re +pository UNIVERSAL-moniker 0.08: new version 0.08 available in ActiveState Pack +age Repository WWW-Mechanize 0.72: new version 1.14 available in ActiveState Package +Repository WWW-Mechanize-Shell 0.19: new version 0.34 available in ActiveState Pa +ckage Repository

Am I the only one experiencing this, or am I just the only one frustrated enough to post a SoPW on the subject? ;) Any suggestions would be appreciated.

By the way, I'm using PPM version 3.2. And ActivePerl 5.8.7 build 813 for Win32. I believe those are the most current versions of each.


Dave

Replies are listed 'Best First'.
Re: PPM mis-identifying / failing to upgrade some module upgrade candidates
by terra incognita (Pilgrim) on Oct 14, 2005 at 15:58 UTC
    I have seen this too. With a little digging I located the code that deals with this functionality.

    Two issues spring to mind when I read the comments below.

  • the order of your repositories matter and
  • if the repository description doesn't match the installed description then it will show an upgrade version
    # 3. Send the installed version to the Repository for checking. # I used to only upgrade from the place it came from. Now it will com +e # from the current repository. my $res = $pkg->uptodate($target); unless ($res->ok) { return Error("bundled package - no upgrade available") if $bundled; return $res; } my ($uptodate, $newversion) = $res->result_l; # 4. Return uptodate(t/f), newversion, oldversion, bundled(t/f): return List($uptodate, $bundled, $precious, $newversion, $ver_p); } # Find the first repository containing the package, and report whether + the # package is up-to-date w.r.t that repository. sub uptodate { my $o = shift; my $target = PPM::UI::get_targ(shift)->result; my $desc = $o->describe($target); if ($o->{current_rep} and $desc and $desc->ok) { my $u2d = $o->{current_rep}->uptodate( $target, $o->{id}, $desc->result->version_osd, ); return $u2d; } Error("package $o->{rawname} not found in repositories"); }
    If I set the first repository to be the "ActiveState Package Repository" (which is where the upgrade is).Then request the upgrade information and issue a describe on what was found I get the following.

    ppm> describe cgi-enurl ==================== Name: CGI-Enurl Version: 1.07 Author: Unknown ( ) Title: CGI-Enurl Abstract: Encode strings, arrays and hashes so that they may be append +ed to URLs as queries Location: ActiveState Package Repository Available Platforms: 1. i686-linux-thread-multi-5.8 ==================== ppm>
    Listing the properties of currently installed package results in the this listing.
    ppm> prop cgi-enurl ==================== Name: CGI-Enurl Version: 1.07 Author: Jan Krynicky (=Jan Krynicky) (Jenda@Krynicky.cz) Title: CGI-Enurl Abstract: Encode strings, arrays and hashes so that they may be append +ed to URLs as queries InstDate: 08:17:45 2005 Location: http://ppm.ActiveState.com/cgibin/PPM/ppmserver-5.8-windows. +pl?urn:/PPMServer Available Platforms: 1. MSWin32-x86-multi-thread-5.8 ==================== ppm>
    The author is missing in the repository for some reason. Interestingly if I look at the raw out from describe it is listed.
    ppm> describe -dump cgi-enurl ==================== <?xml version="1.0" encoding="UTF-8"?> <SOFTPKG NAME="CGI-Enurl" VERSION="1,07,0,0"> <IMPLEMENTATION> <CODEBASE HREF="http://ppm.activestate.com/PPMPackages/5.8-windows +/MSWin32-x86-multi-thread-5.8/CGI-Enurl.tar.gz" /> <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> <OS NAME="MSWin32" /> </IMPLEMENTATION> <ABSTRACT>Encode strings, arrays and hashes so that they may be appe +nded to URLs as queries</ABSTRACT> <AUTHOR>Jan Krynicky (=Jan Krynicky) (Jenda@Krynicky.cz)</AUTHOR> <TITLE>CGI-Enurl</TITLE> </SOFTPKG> ==================== ppm>
    I may be incorrect but I don't believe I have seen this issue with packages from Uwinnipeg. Maybe it is an ActiveState repository issue?
Re: PPM mis-identifying / failing to upgrade some module upgrade candidates
by randyk (Parson) on Oct 14, 2005 at 15:45 UTC

    I see the same problem. One pattern that emerges is the following. The ppm utility comes configured with two ActiveState repositories: "ActiveState PPM2 Repository" and "Activestate Package Repository". The problem seems to lie in whether or not a given package is in one or both repositories:

    • for a package like Module-Which, which is in both repositories, installing the latest version and then querying whether or not an upgrade is available results in the package being reported as up-to-date.
    • for a package like CGI-Enurl, which is in the "ActiveState PPM2 Repository" only, installing the latest version and then querying whether or not an upgrade is available results in an upgrade reported as being available from the "Activestate Package Repository", even though, as you found, the upgraded version matches the installed version.
    This is most likely a bug in the ppm utility, as it shouldn't be finding upgradeable packages in the "Activestate Package Repository" when none are there.

    As a poor workaround, if within the ppm shell you turn off the "Activestate Package Repository" using the rep off command, then, for example, CGI-Enurl would be reported as up-to-date. However, there may be packages within the "Activestate Package Repository" that are not in the "ActiveState PPM2 Repository", so doing this may result in some available packages not being found. As well, searches may be slower without the "Activestate Package Repository", as this uses a database lookup.

    There's a ppm mailing list available which would be a good forum to report this (it's a low-volume list, and ActiveState developers regularly monitor it).

      CGI-Enurl is in both repositories however one is linux and one is windows.
      ppm> s cgi-enur Searching in Active Repositories 1. CGI-Enurl [1.07] Encode strings, arrays and hashes so that they m +ay be appended to URLs as queries ppm> describe 1 ==================== Package 1: Name: CGI-Enurl Version: 1.07 Author: Jan Krynicky (=Jan Krynicky) (Jenda@Krynicky.cz) Title: CGI-Enurl Abstract: Encode strings, arrays and hashes so that they may be append +ed to URLs as queries Location: ActiveState PPM2 Repository Available Platforms: 1. MSWin32-x86-multi-thread-5.8 ==================== ppm> upgrade cgi-enurl CGI-Enurl 1.07: new version 1.07 available in ActiveState Package Repo +sitory ppm> describe cgi-enurl ==================== Name: CGI-Enurl Version: 1.07 Author: Unknown ( ) Title: CGI-Enurl Abstract: Encode strings, arrays and hashes so that they may be append +ed to URLs as queries Location: ActiveState Package Repository Available Platforms: 1. i686-linux-thread-multi-5.8 ==================== ppm>
      For some reason it appears that PPM is always checking "ActiveState Package Repository" first or giving it priority. Turning off that repository causes the correct results to be reported.
        My list of repositories in the ppm utility only includes those for MSWin32-x86-multi-thread-5.8, which is why I don't find a CGI-Enurl package in the "ActiveState Package Repository" repository.