worker.pm (b274bc22) | worker.pm (dba1a2e4) |
---|---|
1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 719 unchanged lines hidden (view full) --- 728 729 for ( my $i = 0; $i <= $#{$itemsref}; $i++ ) 730 { 731 my $oneitem = ${$itemsref}[$i]; 732 my $styles = ""; 733 if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'} }; 734 if ( $styles =~ /\b$flag\b/ ) 735 { | 1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 719 unchanged lines hidden (view full) --- 728 729 for ( my $i = 0; $i <= $#{$itemsref}; $i++ ) 730 { 731 my $oneitem = ${$itemsref}[$i]; 732 my $styles = ""; 733 if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'} }; 734 if ( $styles =~ /\b$flag\b/ ) 735 { |
736 my $infoline = "Attention: Removing from collector: $oneitem->{'Name'} !\n"; 737 $installer::logger::Lang->print($infoline); 738 if ( $flag eq "BINARYTABLE_ONLY" ) { push(@installer::globals::binarytableonlyfiles, $oneitem); } | 736 $installer::logger::Lang->printf("Attention: Removing from collector: %s\n", $oneitem->{'Name'}); 737 if ($flag eq "BINARYTABLE_ONLY") 738 { 739 push(@installer::globals::binarytableonlyfiles, $oneitem); 740 } |
739 next; 740 } 741 push( @allitems, $oneitem ); 742 } 743 744 return \@allitems; 745} 746 --- 1625 unchanged lines hidden (view full) --- 2372 $installer::logger::Global->printf( 2373 "%s does not exist. (Can be removed from include path list?)\n", 2374 $includepath); 2375 next; 2376 } 2377 2378 my @sourcefiles = (); 2379 my $pathstring = ""; | 741 next; 742 } 743 push( @allitems, $oneitem ); 744 } 745 746 return \@allitems; 747} 748 --- 1625 unchanged lines hidden (view full) --- 2374 $installer::logger::Global->printf( 2375 "%s does not exist. (Can be removed from include path list?)\n", 2376 $includepath); 2377 next; 2378 } 2379 2380 my @sourcefiles = (); 2381 my $pathstring = ""; |
2380 # installer::systemactions::read_complete_directory($includepath, $pathstring, \@sourcefiles); | |
2381 installer::systemactions::read_full_directory($includepath, $pathstring, \@sourcefiles); 2382 2383 if ( ! ( $#sourcefiles > -1 )) 2384 { 2385 $installer::logger::Global->printf( 2386 "%s is empty. (Can be removed from include path list?)\n", 2387 $includepath); 2388 } --- 317 unchanged lines hidden (view full) --- 2706 my $max = 5000; # number of pathes in one file 2707 2708 my @pathcollector = (); 2709 my $startnumber = 0; 2710 my $counter = 0; 2711 2712 for ( my $i = 0; $i <= $#{$filesref}; $i++ ) 2713 { | 2382 installer::systemactions::read_full_directory($includepath, $pathstring, \@sourcefiles); 2383 2384 if ( ! ( $#sourcefiles > -1 )) 2385 { 2386 $installer::logger::Global->printf( 2387 "%s is empty. (Can be removed from include path list?)\n", 2388 $includepath); 2389 } --- 317 unchanged lines hidden (view full) --- 2707 my $max = 5000; # number of pathes in one file 2708 2709 my @pathcollector = (); 2710 my $startnumber = 0; 2711 my $counter = 0; 2712 2713 for ( my $i = 0; $i <= $#{$filesref}; $i++ ) 2714 { |
2714 my $line = ${$filesref}[$i]->{'sourcepath'} . "\n"; 2715 push(@pathcollector, $line); | 2715 my $filename = ${$filesref}[$i]->{'sourcepath'}; 2716 push(@pathcollector, $filename . "\n"); |
2716 $counter++; 2717 2718 if (( $i == $#{$filesref} ) || ((( $counter % $max ) == 0 ) && ( $i > 0 ))) 2719 { 2720 my $tmpfilename = "cygwinhelper_" . $i . ".txt"; 2721 my $temppath = $installer::globals::temppath; 2722 $temppath =~ s/\Q$installer::globals::separator\E\s*$//; 2723 $tmpfilename = $temppath . $installer::globals::separator . $tmpfilename; 2724 $infoline = "Creating temporary file for cygwin conversion: $tmpfilename (contains $counter pathes)\n"; 2725 $installer::logger::Lang->print($infoline); 2726 if ( -f $tmpfilename ) { unlink $tmpfilename; } 2727 2728 installer::files::save_file($tmpfilename, \@pathcollector); 2729 2730 my $success = 0; | 2717 $counter++; 2718 2719 if (( $i == $#{$filesref} ) || ((( $counter % $max ) == 0 ) && ( $i > 0 ))) 2720 { 2721 my $tmpfilename = "cygwinhelper_" . $i . ".txt"; 2722 my $temppath = $installer::globals::temppath; 2723 $temppath =~ s/\Q$installer::globals::separator\E\s*$//; 2724 $tmpfilename = $temppath . $installer::globals::separator . $tmpfilename; 2725 $infoline = "Creating temporary file for cygwin conversion: $tmpfilename (contains $counter pathes)\n"; 2726 $installer::logger::Lang->print($infoline); 2727 if ( -f $tmpfilename ) { unlink $tmpfilename; } 2728 2729 installer::files::save_file($tmpfilename, \@pathcollector); 2730 2731 my $success = 0; |
2732 $installer::logger::Lang->printf( 2733 "Converting %d filenames to cygwin notation\n", 2734 $counter); |
|
2731 my @cyg_sourcepathlist = qx{cygpath -w -f "$tmpfilename"}; 2732 chomp @cyg_sourcepathlist; 2733 2734 # Validating the array, it has to contain the correct number of values 2735 my $new_pathes = $#cyg_sourcepathlist + 1; 2736 if ( $new_pathes == $counter ) { $success = 1; } 2737 2738 if ($success) 2739 { | 2735 my @cyg_sourcepathlist = qx{cygpath -w -f "$tmpfilename"}; 2736 chomp @cyg_sourcepathlist; 2737 2738 # Validating the array, it has to contain the correct number of values 2739 my $new_pathes = $#cyg_sourcepathlist + 1; 2740 if ( $new_pathes == $counter ) { $success = 1; } 2741 2742 if ($success) 2743 { |
2740 $infoline = "Success: Successfully converted to cygwin pathes!\n"; 2741 $installer::logger::Lang->print($infoline); | 2744 $installer::logger::Lang->printf( 2745 "Successfully converted %d paths to cygwin notation\n", 2746 $counter); 2747 $installer::logger::Lang->printf( 2748 "there where %d unique paths\n", 2749 scalar keys %paths); |
2742 } 2743 else 2744 { | 2750 } 2751 else 2752 { |
2745 $infoline = "ERROR: Failed to convert to cygwin pathes!\n"; 2746 $installer::logger::Lang->print($infoline); 2747 installer::exiter::exit_program("ERROR: Failed to convert to cygwin pathes!", "generate_cygwin_pathes"); | 2753 $installer::logger::Lang->print("ERROR: Failed to convert to cygwin pathes!\n"); 2754 installer::exiter::exit_program( 2755 "ERROR: Failed to convert to cygwin pathes!", 2756 "generate_cygwin_pathes"); |
2748 } 2749 2750 for ( my $j = 0; $j <= $#cyg_sourcepathlist; $j++ ) 2751 { 2752 my $number = $startnumber + $j; 2753 ${$filesref}[$number]->{'cyg_sourcepath'} = $cyg_sourcepathlist[$j]; 2754 } 2755 --- 689 unchanged lines hidden --- | 2757 } 2758 2759 for ( my $j = 0; $j <= $#cyg_sourcepathlist; $j++ ) 2760 { 2761 my $number = $startnumber + $j; 2762 ${$filesref}[$number]->{'cyg_sourcepath'} = $cyg_sourcepathlist[$j]; 2763 } 2764 --- 689 unchanged lines hidden --- |