← Index
NYTProf Performance Profile   « block view • line view • sub view »
For C:/lo/libo-master/solenv/bin/make_installer.pl
  Run on Mon Sep 24 00:52:54 2012
Reported on Mon Sep 24 07:34:30 2012

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/archivefiles.pm
StatementsExecuted 294454 statements in 1.63s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
865421813ms813msinstaller::archivefiles::::CORE:ftfileinstaller::archivefiles::CORE:ftfile (opcode)
111687ms50.0sinstaller::archivefiles::::resolving_archive_flaginstaller::archivefiles::resolving_archive_flag
5006614195.6ms95.6msinstaller::archivefiles::::CORE:matchinstaller::archivefiles::CORE:match (opcode)
11148.3ms191msinstaller::archivefiles::::BEGIN@30installer::archivefiles::BEGIN@30
166825118.9ms18.9msinstaller::archivefiles::::CORE:substinstaller::archivefiles::CORE:subst (opcode)
102453110.0ms10.0msinstaller::archivefiles::::CORE:regcompinstaller::archivefiles::CORE:regcomp (opcode)
53115.71ms7.06msinstaller::archivefiles::::get_all_executables_from_manifestinstaller::archivefiles::get_all_executables_from_manifest
53112.28ms30.8msinstaller::archivefiles::::collect_all_executable_files_in_extensionsinstaller::archivefiles::collect_all_executable_files_in_extensions
1111.79ms111msinstaller::archivefiles::::BEGIN@31installer::archivefiles::BEGIN@31
211513µs513µsinstaller::archivefiles::::CORE:chmodinstaller::archivefiles::CORE:chmod (opcode)
421435µs435µsinstaller::archivefiles::::CORE:chdirinstaller::archivefiles::CORE:chdir (opcode)
11119µs99µsinstaller::archivefiles::::BEGIN@37installer::archivefiles::BEGIN@37
11119µs21µsinstaller::archivefiles::::BEGIN@32installer::archivefiles::BEGIN@32
11117µs19µsinstaller::archivefiles::::BEGIN@33installer::archivefiles::BEGIN@33
11117µs76µsinstaller::archivefiles::::BEGIN@34installer::archivefiles::BEGIN@34
11116µs18µsinstaller::archivefiles::::BEGIN@36installer::archivefiles::BEGIN@36
11115µs18µsinstaller::archivefiles::::BEGIN@35installer::archivefiles::BEGIN@35
0000s0sinstaller::archivefiles::::get_patch_file_listinstaller::archivefiles::get_patch_file_list
0000s0sinstaller::archivefiles::::put_language_into_nameinstaller::archivefiles::put_language_into_name
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org. If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28package installer::archivefiles;
29
3021.37ms2192ms
# spent 191ms (48.3+143) within installer::archivefiles::BEGIN@30 which was called: # once (48.3ms+143ms) by installer::BEGIN@35 at line 30
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
# spent 191ms making 1 call to installer::archivefiles::BEGIN@30 # spent 367µs making 1 call to Exporter::import
3121.21ms2111ms
# spent 111ms (1.79+110) within installer::archivefiles::BEGIN@31 which was called: # once (1.79ms+110ms) by installer::BEGIN@35 at line 31
use installer::exiter;
# spent 111ms making 1 call to installer::archivefiles::BEGIN@31 # spent 4µs making 1 call to UNIVERSAL::import
32256µs223µs
# spent 21µs (19+2) within installer::archivefiles::BEGIN@32 which was called: # once (19µs+2µs) by installer::BEGIN@35 at line 32
use installer::files;
# spent 21µs making 1 call to installer::archivefiles::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
33255µs221µs
# spent 19µs (17+2) within installer::archivefiles::BEGIN@33 which was called: # once (17µs+2µs) by installer::BEGIN@35 at line 33
use installer::globals;
# spent 19µs making 1 call to installer::archivefiles::BEGIN@33 # spent 2µs making 1 call to UNIVERSAL::import
34257µs2136µs
# spent 76µs (17+60) within installer::archivefiles::BEGIN@34 which was called: # once (17µs+60µs) by installer::BEGIN@35 at line 34
use installer::logger;
# spent 76µs making 1 call to installer::archivefiles::BEGIN@34 # spent 60µs making 1 call to Exporter::import
35253µs220µs
# spent 18µs (15+2) within installer::archivefiles::BEGIN@35 which was called: # once (15µs+2µs) by installer::BEGIN@35 at line 35
use installer::pathanalyzer;
# spent 18µs making 1 call to installer::archivefiles::BEGIN@35 # spent 2µs making 1 call to UNIVERSAL::import
36252µs220µs
# spent 18µs (16+2) within installer::archivefiles::BEGIN@36 which was called: # once (16µs+2µs) by installer::BEGIN@35 at line 36
use installer::systemactions;
# spent 18µs making 1 call to installer::archivefiles::BEGIN@36 # spent 2µs making 1 call to UNIVERSAL::import
3725.26ms2178µs
# spent 99µs (19+80) within installer::archivefiles::BEGIN@37 which was called: # once (19µs+80µs) by installer::BEGIN@35 at line 37
use Cwd;
# spent 99µs making 1 call to installer::archivefiles::BEGIN@37 # spent 80µs making 1 call to Exporter::import
38
39#################################################################
40# Changing the name for files with flag RENAME_TO_LANGUAGE
41#################################################################
42
43sub put_language_into_name
44{
45 my ( $oldname, $onelanguage ) = @_;
46
47 my $newname = "";
48
49 my $filename = "";
50 my $extension = "";
51
52 if ( $oldname =~ /en-US/ ) # files, that contain the language in the file name
53 {
54 $newname = $oldname;
55 $newname =~ s/en-US/$onelanguage/;
56 }
57 else # files, that do not contain the language in the file name
58 {
59 if ( $oldname =~ /^\s*(.*)(\..*?)\s*$/ ) # files with extension
60 {
61 $filename = $1;
62 $extension = $2;
63 }
64 else
65 {
66 $filename = $oldname;
67 $extension = "";
68 }
69
70 $newname = $1 . "_" . $onelanguage . $2;
71 }
72
73 return $newname;
74}
75
76#################################################################
77# Converting patchfiles string into array
78#################################################################
79
80sub get_patch_file_list
81{
82 my ( $patchfilestring ) = @_;
83
84 $patchfilestring =~ s/^\s*\(?//;
85 $patchfilestring =~ s/\)?\s*$//;
86 $patchfilestring =~ s/^\s*\///;
87 $patchfilestring =~ s/^\s*\\//;
88
89 my @patchfilesarray = split /,\s*/, $patchfilestring;
90
91 return \@patchfilesarray;
92}
93
94#################################################################
95# Reading all executables in the "manifest.xml"
96#################################################################
97
98sub get_all_executables_from_manifest
99
# spent 7.06ms (5.71+1.35) within installer::archivefiles::get_all_executables_from_manifest which was called 53 times, avg 133µs/call: # 53 times (5.71ms+1.35ms) by installer::archivefiles::collect_all_executable_files_in_extensions at line 138, avg 133µs/call
{
10019917.13ms my ($unzipdir, $manifestfile, $executable_files_in_extensions) = @_;
101
102 my $is_executable = 0;
103
104 for ( my $i = 0; $i <= $#{$manifestfile}; $i++ )
105 {
106 my $line = ${$manifestfile}[$i];
107
108458305µs if ( $line =~ /\"application\/vnd\.sun\.star\.executable\"/ ) { $is_executable = 1; }
# spent 305µs making 458 calls to installer::archivefiles::CORE:match, avg 666ns/call
109
110458601µs if (( $line =~ /manifest\:full\-path=\"(.*?)\"/ ) && ( $is_executable ))
# spent 601µs making 458 calls to installer::archivefiles::CORE:match, avg 1µs/call
111 {
112 my $filename = $unzipdir . $installer::globals::separator . $1;
113 # making only slashes for comparison reasons
114 $filename =~ s/\\/\//g;
115 $executable_files_in_extensions->{$filename} = 1;
116 }
117
118458442µs if ( $line =~ /\/\>/ ) { $is_executable = 0; }
# spent 442µs making 458 calls to installer::archivefiles::CORE:match, avg 965ns/call
119 }
120}
121
122#################################################################
123# Reading the "manifest.xml" in extensions and determine, if
124# there are executable files
125#################################################################
126
127sub collect_all_executable_files_in_extensions
128
# spent 30.8ms (2.28+28.5) within installer::archivefiles::collect_all_executable_files_in_extensions which was called 53 times, avg 580µs/call: # 53 times (2.28ms+28.5ms) by installer::archivefiles::resolving_archive_flag at line 317, avg 580µs/call
{
1293188.15ms my ($unzipdir, $executable_files_in_extensions) = @_;
130
131106650µs $unzipdir =~ s/\Q$installer::globals::separator\E\s*$//;
# spent 484µs making 53 calls to installer::archivefiles::CORE:subst, avg 9µs/call # spent 167µs making 53 calls to installer::archivefiles::CORE:regcomp, avg 3µs/call
132
133 my $manifestfilename = $unzipdir . $installer::globals::separator . "META-INF" . $installer::globals::separator . "manifest.xml";
134
135535.29ms if ( -f $manifestfilename )
# spent 5.29ms making 53 calls to installer::archivefiles::CORE:ftfile, avg 100µs/call
136 {
1375315.5ms my $manifestfile = installer::files::read_file($manifestfilename);
# spent 15.5ms making 53 calls to installer::files::read_file, avg 292µs/call
138537.06ms get_all_executables_from_manifest($unzipdir, $manifestfile, $executable_files_in_extensions);
# spent 7.06ms making 53 calls to installer::archivefiles::get_all_executables_from_manifest, avg 133µs/call
139 }
140}
141
142#################################################################
143# Analyzing files with flag ARCHIVE
144#################################################################
145
146sub resolving_archive_flag
147
# spent 50.0s (687ms+49.3) within installer::archivefiles::resolving_archive_flag which was called: # once (687ms+49.3s) by installer::run at line 688 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
1482921281.60s my ($filesarrayref, $additionalpathsref, $languagestringref, $loggingdir) = @_;
149
150 my @newallfilesarray = ();
151
152 my ($systemcall, $returnvalue, $infoline);
153
154 my $unziplistfile = $loggingdir . "unziplist_" . $installer::globals::build . "_" . $installer::globals::compiler . "_" . $$languagestringref . ".txt";
155
1561481ms my $platformunzipdirbase = installer::systemactions::create_directories("zip", $languagestringref);
# spent 481ms making 1 call to installer::systemactions::create_directories
157 push(@installer::globals::removedirs, $platformunzipdirbase);
158
1591205µs installer::logger::include_header_into_logfile("Files with flag ARCHIVE:");
# spent 205µs making 1 call to installer::logger::include_header_into_logfile
160
161 my $repeat_unzip = 0;
162 my $maxcounter = 0;
163
164 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
165 {
166 if ( $repeat_unzip ) { $i--; } # decreasing the counter
167
168 my $onefile = ${$filesarrayref}[$i];
169 my $styles = "";
170
171 if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
172
17375044.93ms if ( $styles =~ /\bARCHIVE\b/ ) # copying, unzipping and changing the file list
# spent 4.93ms making 7504 calls to installer::archivefiles::CORE:match, avg 657ns/call
174 {
175 my $iscommonfile = 0;
176 my $sourcepath = $onefile->{'sourcepath'};
177
178420643µs if ( $sourcepath =~ /\Q$installer::globals::separator\E\bcommon$installer::globals::productextension\Q$installer::globals::separator\E/ ) # /common/ or /common.pro/
# spent 469µs making 210 calls to installer::archivefiles::CORE:regcomp, avg 2µs/call # spent 175µs making 210 calls to installer::archivefiles::CORE:match, avg 831ns/call
179 {
180 $iscommonfile = 1;
181 }
182
183 my $use_internal_rights = 0;
184210125µs if ( $styles =~ /\bUSE_INTERNAL_RIGHTS\b/ ) { $use_internal_rights = 1; } # using the rights used inside the zip file
# spent 125µs making 210 calls to installer::archivefiles::CORE:match, avg 594ns/call
185
186 my $rename_to_language = 0;
187210191µs if ( $styles =~ /\bRENAME_TO_LANGUAGE\b/ ) { $rename_to_language = 1; } # special handling for renamed files (scriptitems.pm)
# spent 191µs making 210 calls to installer::archivefiles::CORE:match, avg 910ns/call
188
189 my %executable_files_in_extensions = ();
190 my $set_executable_privileges = 0; # setting privileges for exectables is required for oxt files
191210347µs if ( $onefile->{'Name'} =~ /\.oxt\s*$/ ) { $set_executable_privileges = 1; }
# spent 347µs making 210 calls to installer::archivefiles::CORE:match, avg 2µs/call
192
193 # mechanism to select files from an archive files
194 my $select_files = 0;
195 my $selectlistfiles = "";
196 my @keptfiles = ();
197 if ( $onefile->{'Selectfiles'} )
198 {
199 $select_files = 1;
200 $selectlistfiles = get_patch_file_list( $onefile->{'Selectfiles'} );
201 $infoline = "Selected file list defined at file: $onefile->{'Name'} :\n";
202 push( @installer::globals::logfileinfo, $infoline);
203 for ( my $k = 0; $k <= $#{$selectlistfiles}; $k++ )
204 {
205 $infoline = "\"${$selectlistfiles}[$k]\"\n";
206 push( @installer::globals::logfileinfo, $infoline);
207 }
208 }
209
210 if ( $onefile->{'Selectfiles'} ) { $onefile->{'Selectfiles'} = ""; } # Selected files list no longer required
211
212 # mechanism to define patch files inside an archive files
213 my $select_patch_files = 0;
214 my $patchlistfiles = "";
215 my @keptpatchflags = ();
216210158µs if (( $styles =~ /\bPATCH\b/ ) && ( $onefile->{'Patchfiles'} ) && ( $installer::globals::patch ))
# spent 158µs making 210 calls to installer::archivefiles::CORE:match, avg 750ns/call
217 {
218 $select_patch_files = 1; # special handling if a Patchlist is defined
219 $patchlistfiles = get_patch_file_list( $onefile->{'Patchfiles'} );
220 $infoline = "Patch file list defined at file: $onefile->{'Name'} :\n";
221 push( @installer::globals::logfileinfo, $infoline);
222 for ( my $k = 0; $k <= $#{$patchlistfiles}; $k++ )
223 {
224 $infoline = "\"${$patchlistfiles}[$k]\"\n";
225 push( @installer::globals::logfileinfo, $infoline);
226 }
227 }
228
229 if ( $onefile->{'Patchfiles'} ) { $onefile->{'Patchfiles'} = ""; } # Patch file list no longer required
230
231 # creating directories
232
233 my $onelanguage = $onefile->{'specificlanguage'};
234
235 # files without language into directory "00"
236
237 if ($onelanguage eq "") { $onelanguage = "00"; }
238
239 my $unzipdir;
240
241 $unzipdir = $platformunzipdirbase . $installer::globals::separator . $onelanguage . $installer::globals::separator;
242
243210135ms installer::systemactions::create_directory($unzipdir); # creating language specific subdirectories
# spent 135ms making 210 calls to installer::systemactions::create_directory, avg 644µs/call
244
245 my $onefilename = $onefile->{'Name'};
2462101.49ms $onefilename =~ s/\./\_/g; # creating new directory name
# spent 1.49ms making 210 calls to installer::archivefiles::CORE:subst, avg 7µs/call
247210132µs $onefilename =~ s/\//\_/g; # only because of /letter/fontunxpsprint.zip, the only zip file with path
# spent 132µs making 210 calls to installer::archivefiles::CORE:subst, avg 630ns/call
248 $unzipdir = $unzipdir . $onefilename . $installer::globals::separator;
249
250210192ms if ( $installer::globals::dounzip ) { installer::systemactions::create_directory($unzipdir); } # creating subdirectories with the names of the zipfiles
# spent 192ms making 210 calls to installer::systemactions::create_directory, avg 913µs/call
251
2522109.52ms my $zip = Archive::Zip->new();
# spent 9.52ms making 210 calls to Archive::Zip::new, avg 45µs/call
2532103.88s if ( $zip->read($sourcepath) != AZ_OK )
# spent 3.88s making 210 calls to Archive::Zip::Archive::read, avg 18.5ms/call
254 {
255 $infoline = "ERROR: Could not unzip $sourcepath\n";
256 push( @installer::globals::logfileinfo, $infoline);
257 }
258
259 my $counter = 0;
260 my $contains_dll = 0;
261 my @dllList = ();
262 my @dirs = ();
263210103ms foreach my $member ( $zip->memberNames() )
# spent 103ms making 210 calls to Archive::Zip::Archive::memberNames, avg 490µs/call
264 {
265 $counter++;
266998239.4ms if ( $member =~ /.dll\s*$/i ) { $contains_dll = 1; push(@dllList, $member); }
# spent 39.4ms making 9982 calls to installer::archivefiles::CORE:match, avg 4µs/call
26799827.45ms if ( $member =~ m/\/$/ ) { push(@dirs, $member); }
# spent 7.45ms making 9982 calls to installer::archivefiles::CORE:match, avg 746ns/call
268 }
269
270 if (! ( $counter > 0 )) # the zipfile is empty
271 {
272 $infoline = "ERROR: Could not unzip $sourcepath\n";
273 push( @installer::globals::logfileinfo, $infoline);
274
275 }
276 else
277 {
278 if ( $installer::globals::dounzip ) # really unpacking the files
279 {
28021043.2s if ( $zip->extractTree("", $unzipdir) != AZ_OK ) { installer::exiter::exit_program("ERROR: $infoline", "resolving_archive_flag"); }
# spent 43.2s making 210 calls to Archive::Zip::Archive::extractTree, avg 206ms/call
281
2822101.25ms if (( $^O =~ /cygwin/i ) && ( $contains_dll ))
# spent 1.25ms making 210 calls to installer::archivefiles::CORE:match, avg 6µs/call
283 {
284224µs my $dir = getcwd();
# spent 24µs making 2 calls to Cwd::__ANON__[Cwd.pm:406], avg 12µs/call
2852239µs chdir($unzipdir);
# spent 239µs making 2 calls to installer::archivefiles::CORE:chdir, avg 120µs/call
2862513µs my $changed = chmod(0775, @dllList);
# spent 513µs making 2 calls to installer::archivefiles::CORE:chmod, avg 257µs/call
287 $infoline = "Changed mode of $changed files (of ".scalar(@dllList).")\n";
288 push( @installer::globals::logfileinfo, $infoline);
2892196µs chdir($dir);
# spent 196µs making 2 calls to installer::archivefiles::CORE:chdir, avg 98µs/call
290
291 if ($changed != scalar(@dllList))
292 {
293 $infoline = "ERROR: Could not chmod all files!\n";
294 push( @installer::globals::logfileinfo, $infoline);
295 }
296 }
297
298 if ( ! $installer::globals::iswindowsbuild && scalar(@dirs) > 0 )
299 {
300 my $dir = getcwd();
301 chdir($unzipdir);
302 # Setting unix rights to "775" for all created directories inside the package
303 my $changed = chmod(0775, @dirs);
304 $infoline = "Changed mode of : $changed; should be: ".scalar(@dirs)."\n";
305 chdir($dir);
306
307 push( @installer::globals::logfileinfo, $infoline);
308
309 if ($changed != scalar(@dirs))
310 {
311 $infoline = "ERROR: Could not chmod all files!\n";
312 push( @installer::globals::logfileinfo, $infoline);
313 }
314 }
315
316 # Selecting names of executable files in extensions
3175330.8ms if ( $set_executable_privileges )
# spent 30.8ms making 53 calls to installer::archivefiles::collect_all_executable_files_in_extensions, avg 580µs/call
318 {
319 collect_all_executable_files_in_extensions($unzipdir, \%executable_files_in_extensions);
320 }
321 }
322
323 my $zipfileref = \@zipfile;
324 my $unziperror = 0;
325
326210105ms foreach my $zipname ( $zip->memberNames() )
# spent 105ms making 210 calls to Archive::Zip::Archive::memberNames, avg 500µs/call
327 {
328 # Format from Archive:::Zip :
329 # dir1/
330 # dir1/so7drawing.desktop
331
332 # some directories and files (from the help) start with "./simpress.idx"
333
334998211.0ms $zipname =~ s/^\s*\.\///;
# spent 11.0ms making 9982 calls to installer::archivefiles::CORE:subst, avg 1µs/call
335
336998214.0ms if ($installer::globals::iswin and $^O =~ /MSWin/i) { $zipname =~ s/\//\\/g; }
# spent 14.0ms making 9982 calls to installer::archivefiles::CORE:match, avg 1µs/call
337
3381996435.7ms if ( $zipname =~ /\Q$installer::globals::separator\E\s*$/ ) # slash or backslash at the end characterizes a directory
# spent 26.3ms making 9982 calls to installer::archivefiles::CORE:match, avg 3µs/call # spent 9.41ms making 9982 calls to installer::archivefiles::CORE:regcomp, avg 942ns/call
339 {
340 $zipname = $zipname . "\n";
341 push(@{$additionalpathsref}, $zipname);
342
343 # Also needed here:
344 # Name
345 # Language
346 # ismultilingual
347 # Basedirectory
348
349 # This is not needed, because the list of all directories for the
350 # epm list file is generated from the destination directories of the
351 # files included in the product!
352 }
353 else
354 {
355 my %newfile = ();
356 %newfile = %{$onefile};
357 $newfile{'Name'} = $zipname;
358 my $destination = $onefile->{'destination'};
3598601209ms installer::pathanalyzer::get_path_from_fullqualifiedname(\$destination);
# spent 209ms making 8601 calls to installer::pathanalyzer::get_path_from_fullqualifiedname, avg 24µs/call
360 $newfile{'destination'} = $destination . $zipname;
361 $newfile{'sourcepath'} = $unzipdir . $zipname;
362 $newfile{'zipfilename'} = $onefile->{'Name'};
363 $newfile{'zipfilesource'} = $onefile->{'sourcepath'};
364 $newfile{'zipfiledestination'} = $onefile->{'destination'};
365
366 if (( $use_internal_rights ) && ( ! $installer::globals::iswin ))
367 {
368 my $value = sprintf("%o", (stat($newfile{'sourcepath'}))[2]);
369 $newfile{'UnixRights'} = substr($value, 3);
370 $infoline = "Setting unix rights for \"$newfile{'sourcepath'}\" to \"$newfile{'UnixRights'}\"\n";
371 push( @installer::globals::logfileinfo, $infoline);
372 }
373
374 if ( $set_executable_privileges )
375 {
376 # All paths to executables are saved in the hash %executable_files_in_extensions
377 my $compare_path = $newfile{'sourcepath'};
37862275.78ms $compare_path =~ s/\\/\//g; # contains only slashes for comparison reasons
# spent 5.78ms making 6227 calls to installer::archivefiles::CORE:subst, avg 928ns/call
379 if ( exists($executable_files_in_extensions{$compare_path}) )
380 {
381 $newfile{'UnixRights'} = "775";
382 $infoline = "Executable in Extension: Setting unix rights for \"$newfile{'sourcepath'}\" to \"$newfile{'UnixRights'}\"\n";
383 push( @installer::globals::logfileinfo, $infoline);
384 }
385 }
386
387 if ( $select_files )
388 {
389 if ( ! grep {$_ eq $zipname} @{$selectlistfiles} )
390 {
391 $infoline = "Removing from ARCHIVE file $onefilename: $zipname\n";
392 push( @installer::globals::logfileinfo, $infoline);
393 next; # ignoring files, that are not included in $selectlistfiles
394 }
395 else
396 {
397 $infoline = "Keeping from ARCHIVE file $onefilename: $zipname\n";
398 push( @installer::globals::logfileinfo, $infoline);
399 push( @keptfiles, $zipname); # collecting all kept files
400 }
401 }
402
403 if ( $select_patch_files )
404 {
405 # Is this file listed in the Patchfile list?
406 # $zipname (filename including path in zip file has to be listed in patchfile list
407
408 if ( ! grep {$_ eq $zipname} @{$patchlistfiles} )
409 {
410 $newfile{'Styles'} =~ s/\bPATCH\b//; # removing the flag PATCH
411 $newfile{'Styles'} =~ s/\,\s*\,/\,/;
412 $newfile{'Styles'} =~ s/\(\s*\,/\(/;
413 $newfile{'Styles'} =~ s/\,\s*\)/\)/;
414 }
415 else
416 {
417 push( @keptpatchflags, $zipname); # collecting all PATCH flags
418 }
419 }
420
421 if ( $rename_to_language )
422 {
423 my $newzipname = put_language_into_name($zipname, $onelanguage);
424 my $oldfilename = $unzipdir . $zipname;
425 my $newfilename = $unzipdir . $newzipname;
426
427 installer::systemactions::copy_one_file($oldfilename, $newfilename);
428
429 $newfile{'Name'} = $newzipname;
430 $newfile{'destination'} = $destination . $newzipname;
431 $newfile{'sourcepath'} = $unzipdir . $newzipname;
432
433 $infoline = "RENAME_TO_LANGUAGE: Using $newzipname instead of $zipname!\n";
434 push( @installer::globals::logfileinfo, $infoline);
435 }
436
437 my $sourcefiletest = $unzipdir . $zipname;
4388601807ms if ( ! -f $sourcefiletest )
# spent 807ms making 8601 calls to installer::archivefiles::CORE:ftfile, avg 94µs/call
439 {
440 $infoline = "ATTENTION: Unzip failed for $sourcefiletest!\n";
441 push( @installer::globals::logfileinfo, $infoline);
442 $unziperror = 1;
443 }
444
445 # only adding the new line into the files array, if not in repeat modus
446
447 if ( ! $repeat_unzip ) { push(@newallfilesarray, \%newfile); }
448 }
449 }
450
451 # Comparing the content of @keptfiles and $selectlistfiles
452 # Do all files from the list of selected files are stored in @keptfiles ?
453 # @keptfiles contains only files included in $selectlistfiles. But are all
454 # files from $selectlistfiles included in @keptfiles?
455
456 if ( $select_files )
457 {
458 my $number = $#{$selectlistfiles} + 1;
459 $infoline = "SELECTLIST: Number of files in file selection list: $number\n";
460 push( @installer::globals::logfileinfo, $infoline);
461 $number = $#keptfiles + 1;
462 $infoline = "SELECTLIST: Number of kept files: $number\n";
463 push( @installer::globals::logfileinfo, $infoline);
464
465 for ( my $k = 0; $k <= $#keptfiles; $k++ )
466 {
467 $infoline = "KEPT FILES: $keptfiles[$k]\n";
468 push( @installer::globals::logfileinfo, $infoline);
469 }
470
471 my @warningfiles = ();
472
473 for ( my $k = 0; $k <= $#{$selectlistfiles}; $k++ )
474 {
475 if ( ! grep {$_ eq ${$selectlistfiles}[$k]} @keptfiles )
476 {
477 push(@warningfiles, ${$selectlistfiles}[$k]);
478 }
479 }
480
481 for ( my $k = 0; $k <= $#warningfiles; $k++ )
482 {
483 $infoline = "WARNING: $warningfiles[$k] not included in install set (does not exist in zip file)!\n";
484 push( @installer::globals::logfileinfo, $infoline);
485 }
486
487 }
488
489 # Comparing the content of @keptpatchflags and $patchlistfiles
490 # Do all files from the patch list have a PATCH flag ?
491 # @keptpatchflags contains only files included in $patchlistfiles. But are all
492 # files from $patchlistfiles included in @keptpatchflags?
493
494 if ( $select_patch_files )
495 {
496 my $number = $#{$patchlistfiles} + 1;
497 $infoline = "PATCHLIST: Number of files in patch list: $number\n";
498 push( @installer::globals::logfileinfo, $infoline);
499 $number = $#keptpatchflags + 1;
500 $infoline = "PATCHLIST: Number of kept PATCH flags: $number\n";
501 push( @installer::globals::logfileinfo, $infoline);
502
503 for ( my $k = 0; $k <= $#keptpatchflags; $k++ )
504 {
505 $infoline = "KEPT PATCH FLAGS: $keptpatchflags[$k]\n";
506 push( @installer::globals::logfileinfo, $infoline);
507 }
508
509 my @warningfiles = ();
510
511 for ( my $k = 0; $k <= $#{$patchlistfiles}; $k++ )
512 {
513 if ( ! grep {$_ eq ${$patchlistfiles}[$k]} @keptpatchflags )
514 {
515 push(@warningfiles, ${$patchlistfiles}[$k]);
516 }
517 }
518
519 for ( my $k = 0; $k <= $#warningfiles; $k++ )
520 {
521 $infoline = "WARNING: $warningfiles[$k] did not keep PATCH flag (does not exist in zip file)!\n";
522 push( @installer::globals::logfileinfo, $infoline);
523 }
524 }
525
526 if ( $unziperror )
527 {
528 installer::logger::print_warning( "Repeating to unpack $sourcepath! \n" );
529 $infoline = "ATTENTION: Repeating to unpack $sourcepath !\n";
530 push( @installer::globals::logfileinfo, $infoline);
531 $repeat_unzip = 1;
532 $maxcounter++;
533
534 if ( $maxcounter == 5 ) # exiting the program
535 {
536 installer::exiter::exit_program("ERROR: Failed to unzip $sourcepath !", "resolving_archive_flag");
537 }
538 }
539 else
540 {
541 $infoline = "Info: $sourcepath unpacked without problems !\n";
542 push( @installer::globals::logfileinfo, $infoline);
543 $repeat_unzip = 0;
544 $maxcounter = 0;
545 }
546 }
547 }
548 else # nothing to do here, no zipped file (no ARCHIVE flag)
549 {
550 push(@newallfilesarray, $onefile);
551 }
552 }
553
554 $infoline = "\n";
555 push( @installer::globals::logfileinfo, $infoline);
556
557 return \@newallfilesarray;
558}
559
560
56118µs1;
 
# spent 435µs within installer::archivefiles::CORE:chdir which was called 4 times, avg 109µs/call: # 2 times (239µs+0s) by installer::archivefiles::resolving_archive_flag at line 285, avg 120µs/call # 2 times (196µs+0s) by installer::archivefiles::resolving_archive_flag at line 289, avg 98µs/call
sub installer::archivefiles::CORE:chdir; # opcode
# spent 513µs within installer::archivefiles::CORE:chmod which was called 2 times, avg 257µs/call: # 2 times (513µs+0s) by installer::archivefiles::resolving_archive_flag at line 286, avg 257µs/call
sub installer::archivefiles::CORE:chmod; # opcode
# spent 813ms within installer::archivefiles::CORE:ftfile which was called 8654 times, avg 94µs/call: # 8601 times (807ms+0s) by installer::archivefiles::resolving_archive_flag at line 438, avg 94µs/call # 53 times (5.29ms+0s) by installer::archivefiles::collect_all_executable_files_in_extensions at line 135, avg 100µs/call
sub installer::archivefiles::CORE:ftfile; # opcode
# spent 95.6ms within installer::archivefiles::CORE:match which was called 50066 times, avg 2µs/call: # 9982 times (39.4ms+0s) by installer::archivefiles::resolving_archive_flag at line 266, avg 4µs/call # 9982 times (26.3ms+0s) by installer::archivefiles::resolving_archive_flag at line 338, avg 3µs/call # 9982 times (14.0ms+0s) by installer::archivefiles::resolving_archive_flag at line 336, avg 1µs/call # 9982 times (7.45ms+0s) by installer::archivefiles::resolving_archive_flag at line 267, avg 746ns/call # 7504 times (4.93ms+0s) by installer::archivefiles::resolving_archive_flag at line 173, avg 657ns/call # 458 times (601µs+0s) by installer::archivefiles::get_all_executables_from_manifest at line 110, avg 1µs/call # 458 times (442µs+0s) by installer::archivefiles::get_all_executables_from_manifest at line 118, avg 965ns/call # 458 times (305µs+0s) by installer::archivefiles::get_all_executables_from_manifest at line 108, avg 666ns/call # 210 times (1.25ms+0s) by installer::archivefiles::resolving_archive_flag at line 282, avg 6µs/call # 210 times (347µs+0s) by installer::archivefiles::resolving_archive_flag at line 191, avg 2µs/call # 210 times (191µs+0s) by installer::archivefiles::resolving_archive_flag at line 187, avg 910ns/call # 210 times (175µs+0s) by installer::archivefiles::resolving_archive_flag at line 178, avg 831ns/call # 210 times (158µs+0s) by installer::archivefiles::resolving_archive_flag at line 216, avg 750ns/call # 210 times (125µs+0s) by installer::archivefiles::resolving_archive_flag at line 184, avg 594ns/call
sub installer::archivefiles::CORE:match; # opcode
# spent 10.0ms within installer::archivefiles::CORE:regcomp which was called 10245 times, avg 980ns/call: # 9982 times (9.41ms+0s) by installer::archivefiles::resolving_archive_flag at line 338, avg 942ns/call # 210 times (469µs+0s) by installer::archivefiles::resolving_archive_flag at line 178, avg 2µs/call # 53 times (167µs+0s) by installer::archivefiles::collect_all_executable_files_in_extensions at line 131, avg 3µs/call
sub installer::archivefiles::CORE:regcomp; # opcode
# spent 18.9ms within installer::archivefiles::CORE:subst which was called 16682 times, avg 1µs/call: # 9982 times (11.0ms+0s) by installer::archivefiles::resolving_archive_flag at line 334, avg 1µs/call # 6227 times (5.78ms+0s) by installer::archivefiles::resolving_archive_flag at line 378, avg 928ns/call # 210 times (1.49ms+0s) by installer::archivefiles::resolving_archive_flag at line 246, avg 7µs/call # 210 times (132µs+0s) by installer::archivefiles::resolving_archive_flag at line 247, avg 630ns/call # 53 times (484µs+0s) by installer::archivefiles::collect_all_executable_files_in_extensions at line 131, avg 9µs/call
sub installer::archivefiles::CORE:subst; # opcode