Skip to content

Automating non-interactive upgrades #196

@PhilterPaper

Description

@PhilterPaper

First, is this the same 'cpan' as installed with Strawberry Perl (for Windows)? If not, do you know where I can direct this query? Alternately, I am open to switching to another 'cpan' flavor that can handle batch (non-interactive) updates as described below.

I maintain three levels of Perl on my Windows system (currently 5.28, 5.32, and 5.38) and have a non-interactive daily update run using a Perl wrapper to do an 'r' command (to 'cpan') to capture everything that cpan wants updated. I then compare this list against a manually-maintained list of versions I've already tried and failed to upgrade, and remove these, and then do an upgrade attempt of each surviving entry.

This works fairly well (fire it off and come back later to read the summary results for all three Perl levels). However, there are a couple of minor annoyances.

  1. The index of what demands an upgrade apparently doesn't get updated for several days. I can see that a prereq I need has been updated very recently, but isn't seen by cpan for up to several days. Even doing a manual upgrade, i <package_name> doesn't show the new version as available yet. Is there any way to force a daily index update?
  2. There appears to be a cache of upgrade attempts (both failed and successful) that doesn't get older entries cleaned out using this method. Once a month I have to go in and run cpan manually for each Perl level, requesting the upgrade of some package, and this has the side effect of clearing old stuff from the cache. Is there a clean way to force the cache cleanup on a daily basis? Is there even a need for this 'build' cache if I'm always first doing an 'r' to find out what's needed? My update shell could easily erase all the 'build' contents each day, but is there some sort of index that needs to be updated too?

Thanks much for any guidance on improving this process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions