From: Dave Rolsky Date: Thu, 30 Jul 2009 07:16:12 +0000 (-0500) Subject: Update our mini-moosepan X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4125a6fe7f76b092847663b40ce329809362b042;p=gitmo%2Fmoose-presentations.git Update our mini-moosepan Also fixed the script to make sure that the dependency checking is using the same mirror as we actually fetch modules from. --- diff --git a/moose-class/exercises/moosepan/RECENT b/moose-class/exercises/moosepan/RECENT index 32e67ec..0a951ba 100644 --- a/moose-class/exercises/moosepan/RECENT +++ b/moose-class/exercises/moosepan/RECENT @@ -1,7 +1,2 @@ -authors/01mailrc.txt.gz -authors/id/D/DR/DROLSKY/CHECKSUMS -authors/id/D/DR/DROLSKY/Moose-0.88.tar.gz -authors/id/V/VP/VPARSEVAL/CHECKSUMS -authors/id/V/VP/VPARSEVAL/List-MoreUtils-0.24.tar.gz +authors/id/D/DR/DROLSKY/Class-MOP-0.91.tar.gz modules/02packages.details.txt.gz -modules/03modlist.data.gz diff --git a/moose-class/exercises/moosepan/authors/id/D/DR/DROLSKY/Class-MOP-0.89.tar.gz b/moose-class/exercises/moosepan/authors/id/D/DR/DROLSKY/Class-MOP-0.89.tar.gz deleted file mode 100644 index d4cd975..0000000 Binary files a/moose-class/exercises/moosepan/authors/id/D/DR/DROLSKY/Class-MOP-0.89.tar.gz and /dev/null differ diff --git a/moose-class/exercises/moosepan/authors/id/D/DR/DROLSKY/Class-MOP-0.91.tar.gz b/moose-class/exercises/moosepan/authors/id/D/DR/DROLSKY/Class-MOP-0.91.tar.gz new file mode 100644 index 0000000..5984e98 Binary files /dev/null and b/moose-class/exercises/moosepan/authors/id/D/DR/DROLSKY/Class-MOP-0.91.tar.gz differ diff --git a/moose-class/exercises/update-moosepan b/moose-class/exercises/update-moosepan index 46b0dc4..8831a74 100755 --- a/moose-class/exercises/update-moosepan +++ b/moose-class/exercises/update-moosepan @@ -10,15 +10,42 @@ use Module::CoreList; use version; +{ + package CPAN::FindDependencies; + + no warnings 'redefine'; + # The real function assumes that if you provide an argument it's a + # local file, not a URI. + sub _get02packages { + my $file = shift; + + get($file) || + die(__PACKAGE__.": Couldn't fetch 02packages index file\n"); + } +} + + sub main { - my @deps = grep { is_real_dep($_) } finddeps('Moose'); + # If this isn't fetched fresh each time, then CPAN::Mini gets + # confused (maybe it's a timestamp issue because of git?) + unlink './moosepan/modules/02packages.details.txt.gz' + or die $!; + + my @deps + = grep { is_real_dep($_) } + finddeps( 'Moose', + '02packages' => + 'http://mirrors.kernel.org/cpan/modules/02packages.details.txt.gz' + ); my @distros = map { $_->distribution() } @deps; - my $filter_sub = sub { return ! any { $_[0] eq $_ } @distros }; + my $filter_sub = sub { + return !any { $_[0] eq $_ } @distros; + }; CPAN::Mini->update_mirror( - remote => 'ftp://mirrors2.kernel.org/pub/CPAN/', + remote => 'http://mirrors.kernel.org/cpan/', local => './moosepan', path_filters => $filter_sub, trace => 1,