3 Dec 2015 shlomif   » (Master)

Tech Tip: Trimming Old Releases from minicpan Directories

minicpan is a tool to create or update a minimal local mirror of CPAN (= the “Comprehensive Perl Archive Network”), that contains only the latest releases of CPAN distributions. Now, one problem I ran into when using it is that “minicpan” did not seem to delete the older downloaded releases after they were superseded by newer ones. A few days ago I found a solution to this problem.

What you can do is:

  1. Move away the minicpan’s mirror’s top directory (do not delete it!)

  2. Set up a localhost HTTP service on a high TCP port which will serve the moved minicpan directory. For that you can use the one line Python HTTP service command line or shttpd’s “thttpd -p $PORT” invocation or whatever.

  3. Run the “minicpan” command while pointing the remote to the localhost mirror of the old minicpan mirror, using the “-r” flag or by temporarily editing the “~/.minicpanrc” file.

Voila! Now the mirror will only contain the latest releases, and you can remove the old, moved-away, minicpan directory, and cancel the HTTP service.

Licence

Copyright by Shlomi Fish, 2015.

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions of how to comply with it.

Syndicated 2015-07-20 10:54:09 from shlomif

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!