Hello, moreno.colaiac...@libero.it wrote:
The problem is this: when I install a package (for example BioPerl), everything works fine until I see the message "Generating HTML...". At that point everything freezes and PPM never finishes the installation.
After every ActivePerl install I run attached script. It completely removes HTML generation, saving me a lot of time. -- Serguei Trouchelle
#!/usr/bin/perl use strict; use warnings; use DBI; my $perlbin = substr($^X, 0, rindex $^X, '\\'); my $perl = substr($perlbin, 0, rindex $perlbin, '\\'); # Patch Documentation Generation: # ActivePerl::DocTools::UpdateHTML_blib(verbose => 0, blib => "$pname/blib"); # sub UpdateHTML_blib { my $DocTools = $perl . '/lib/ActivePerl/DocTools.pm'; print "Remove HTML generation\n"; if (-e $DocTools) { chmod 0666, $DocTools; if (open(FI, '<', $DocTools)) { local $/; my $DocToolsFile = <FI>; close FI; $DocToolsFile =~ s/(sub UpdateHTML_blib {)/sub UpdateHTML_blib {\n return 1;/sg; # Also add extra space so it would not add "return 1" once more if (open(FO, '>', $DocTools)) { print FO $DocToolsFile; close FO; chmod 0444, $DocTools; } else { warn "Cannot write to $DocTools, $!\n"; } } else { warn "Cannot read $DocTools, $!\n"; } } else { warn "Cannot find $DocTools\n"; } #print "Add more repositories\n"; #system "ppm repo add uwinnipeg"; #system "ppm repo add Local P:/pub/development/languages/perl/repository"; # Make correct versions for updated files my @fixlist = ( { 'name' => 'File::Spec::Win32', 'ver1' => '3.270101', 'ver2' => '3.2701', }, # { # 'name' => # }, ); #$VERSION = '3.270101'; print "Fix versions\n"; my $db_file = $perl . '/etc/ppm-perl-area.db'; my $dbh = DBI->connect("dbi:SQLite:dbname=$db_file", "", "", { AutoCommit => 1, RaiseError => 1, }); my $sql = q! UPDATE feature SET version = ? WHERE name = ? AND version = ? !; my $sth = $dbh->prepare($sql); foreach my $fix (@fixlist) { print 'Fix ', $fix->{'name'}, ' ', $fix->{'ver1'}, "\n"; $sth->execute($fix->{'ver2'}, $fix->{'name'}, $fix->{'ver1'}); }
_______________________________________________ Perl-Win32-Web mailing list Perl-Win32-Web@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs