Re: blanket license statement ...
Sure, My past and future contributions to LibreOffice may be licensed under the MPL/LGPLv3+ licenses. Jordan Ayers On Wed, May 9, 2012 at 11:09 AM, Michael Meeks michael.me...@suse.com wrote: Hi Jordan, I'm just working through the MPL/LGPLv3+ re-licensing audit at the moment (so we can include code from Apache OpenOffice :-) What would really help reduce the work would be if we could have a blanket statement from you for all past/future contributions we can link into: http://wiki.documentfoundation.org/Development/Developers Something like: All of my past future contributions to LibreOffice may be licensed under the MPL/LGPLv3+ dual license sent to the libreoffice@lists.freedesktop.org would be wonderful (no subscription required). Your work on cleaning up the mountains of crufty perl we inherited is much appreciated :-) Thanks ! Michael. -- michael.me...@suse.com , Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] More cleanup in perl installer:: modules.
A few more patches under fdo#39747. #1 and #3 just remove uncalled functions (some were never used in master, some have been unused for a few years). #2 removes an unused data copy from a registry entry handling loop in a function on the Windows side; it's trivial, but I haven't tested it myself. (I'm running on an Ubuntu system; I suppose I should be able to build a Windows Installation package from there and then test that file on a Windows box... I'll try to work through that or set up a windows build so I can run some kind of test on those modules.) The commit comments cover where to find last use (if any) in master, or initial commit of the code (if it was never used). LGPLv3+ / MPL. Jordan Ayers From 8a2ac510c7afea1f471da4935f25976f62fe06f6 Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Wed, 24 Aug 2011 21:55:08 -0500 Subject: [PATCH 1/3] Remove some unused perl functions. Added in CWS nativefixer5, but never used: installer::existence::filename_exists_in_filesarray installer::existence::filegid_exists_in_filesarray Added in CWS native222, but never used: installer::downloadsigner::logfollowmeinfohash Added in CWS newscpzip2, but never used: installer::converter::convert_hash_into_array Added in 2004, used for a month, then dropped from usage: installer::converter::get_number_from_directory --- solenv/bin/modules/installer/converter.pm | 25 solenv/bin/modules/installer/downloadsigner.pm | 18 solenv/bin/modules/installer/existence.pm | 50 3 files changed, 0 insertions(+), 93 deletions(-) diff --git a/solenv/bin/modules/installer/converter.pm b/solenv/bin/modules/installer/converter.pm index 53eb108..2fe728b 100644 --- a/solenv/bin/modules/installer/converter.pm +++ b/solenv/bin/modules/installer/converter.pm @@ -48,13 +48,6 @@ sub convert_array_to_hash return \%newhash; } -sub convert_hash_into_array -{ -my ($hashref) = @_; - -return [map { $_ = $hashref-{$_}\n } keys %{$hashref}]; -} - # # Converting a string list with separator $listseparator # into an array @@ -217,24 +210,6 @@ sub combine_arrays_from_references_first_win } # -# Returning the current ending number of a directory -# - -sub get_number_from_directory -{ -my ( $directory ) = @_; - -my $number = 0; - -if ( $directory =~ /\_(\d+)\s*$/ ) -{ -$number = $1; -} - -return $number; -} - -# # Replacing separators, that are included into quotes # diff --git a/solenv/bin/modules/installer/downloadsigner.pm b/solenv/bin/modules/installer/downloadsigner.pm index 8a63242..d3af898 100644 --- a/solenv/bin/modules/installer/downloadsigner.pm +++ b/solenv/bin/modules/installer/downloadsigner.pm @@ -544,24 +544,6 @@ sub createproductlist return \@infofilelist; } -# -# Logging the content of the download hash -# - -sub logfollowmeinfohash -{ -my ( $followmehash ) = @_; - -print \n*\n; -print Content of follow-me info file:\n; -print finalinstalldir: $followmehash-{'finalinstalldir'}\n; -print downloadname: $followmehash-{'downloadname'}\n; -print languagestring: $followmehash-{'languagestring'}\n; -foreach my $lang ( @{$followmehash-{'languagesarray'}} ) { print languagesarray: $lang\n; } -foreach my $path ( @{$followmehash-{'includepatharray'}} ) { print includepatharray: $path; } -foreach my $key ( sort keys %{$followmehash-{'allvariableshash'}} ) { print allvariableshash: $key : $followmehash-{'allvariableshash'}-{$key}\n; } -} - # Renaming the follow me info file, if it was successfully used. # This can only be done, if the parameter -d was used with a diff --git a/solenv/bin/modules/installer/existence.pm b/solenv/bin/modules/installer/existence.pm index 1ecf9ce..1f362f7 100644 --- a/solenv/bin/modules/installer/existence.pm +++ b/solenv/bin/modules/installer/existence.pm @@ -137,54 +137,4 @@ sub get_specified_file_by_name return $onefile; } -# -# Checking existence of a specific file, defined by its Name -# - -sub filename_exists_in_filesarray -{ -my ($filesarrayref, $searchname) = @_; - -my $foundfile = 0; - -for ( my $i = 0; $i = $#{$filesarrayref}; $i++ ) -{ -my $onefile = ${$filesarrayref}[$i]; -my $filename = $onefile-{'Name
[Libreoffice] [PATCH] Remove unused globals from make_installer.pl
Another minor cleanup, related to fdo#39747. -Removing some completely unused global variables. -Removing the $exiter exit handling function hook (nothing exists which could assign it a function reference). -Demoting $packjobref to a local variable in make_installer.pl (only mentioned twice; a global is overkill here). LGPLv3+/MPL Jordan Ayers From fd8df702c4b606aeaca0c9252428e27663e26ce4 Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Sat, 13 Aug 2011 22:49:11 -0500 Subject: [PATCH] Clean up globals in make_installer.pl Reduce scope of $packjobref. Remove $exithandler and its shutdown check, since no handler was ever assigned. Remove some unused install::global:: variables. --- solenv/bin/make_installer.pl|4 ++-- solenv/bin/modules/installer/exiter.pm |4 solenv/bin/modules/installer/globals.pm |6 -- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl index 561dcef..bb7c684 100644 --- a/solenv/bin/make_installer.pl +++ b/solenv/bin/make_installer.pl @@ -2282,7 +2282,7 @@ for ( my $n = 0; $n = $#installer::globals::languageproducts; $n++ ) my $ddfdir = installer::systemactions::create_directories(ddf, $languagestringref); -$installer::globals::packjobref = installer::windows::msiglobal::generate_cab_file_list($filesinproductlanguageresolvedarrayref, $installdir, $ddfdir, $allvariableshashref); +my $packjobref = installer::windows::msiglobal::generate_cab_file_list($filesinproductlanguageresolvedarrayref, $installdir, $ddfdir, $allvariableshashref); # Update and patch reasons the pack order needs to be saved installer::windows::msiglobal::save_packorder(); @@ -2307,7 +2307,7 @@ for ( my $n = 0; $n = $#installer::globals::languageproducts; $n++ ) if ( $installer::globals::iswin ) # only possible on a Windows platform { installer::logger::print_message( ... packaging installation set ... \n ); -installer::windows::msiglobal::execute_packaging($installer::globals::packjobref, $loggingdir, $allvariableshashref); +installer::windows::msiglobal::execute_packaging($packjobref, $loggingdir, $allvariableshashref); if ( $installer::globals::include_cab_in_msi ) { installer::windows::msiglobal::include_cabs_into_msi($installdir); } diff --git a/solenv/bin/modules/installer/exiter.pm b/solenv/bin/modules/installer/exiter.pm index d5976f4..fa9aeb4 100644 --- a/solenv/bin/modules/installer/exiter.pm +++ b/solenv/bin/modules/installer/exiter.pm @@ -103,10 +103,6 @@ sub exit_program installer::logger::stoptime(); -if (defined($installer::globals::exithandler)) { -$installer::globals::exithandler; -} - exit(-1); } diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index ace634a..eeb3760 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -104,8 +104,6 @@ BEGIN $ziplistname = ; $pathfilename = ; $setupscriptname = ; -$headerfilename = ; -$shellscriptsfilename = ; $product = ; $languagelist = ; $added_english = 0; @@ -150,7 +148,6 @@ BEGIN $unpackpath = ; $idttemplatepath = ; $idtlanguagepath = ; -$packjobref = ; $buildid = Not set; $guidcounter = 1000; # for uniqueness of guids $fontsfolder = FontsFolder; @@ -221,7 +218,6 @@ BEGIN $makelinuxlinkrpm = 0; $linuxlinkrpmprocess = 0; $add_required_package = ; -$linuxrespin = 0; @linuxpatchfiles = (); $linuxlibrarybaselevel = 1; $linuxlibrarypatchlevel = 1.1; @@ -498,8 +494,6 @@ BEGIN @emptypackages = (); %fontpackageexists = (); -$exithandler = undef; - $plat = $^O; if ( $plat =~ /cygwin/i ) -- 1.7.4.1 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] Remove an unused perl module
Another one related to fdo#39747. The file solenv/bin/modules/installer/configuration.pm isn't used at all currently. (I see that it was used for a while back in 2004 by make_installer.pl.) This patch drops the file. LGPLv3+/MPL Jordan Ayers From fc1a7ebdb81cfb927f80a4ba4fb625a40840263f Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Mon, 22 Aug 2011 23:42:00 -0500 Subject: [PATCH] Remove unused perl module. --- solenv/bin/modules/installer/configuration.pm | 896 - 1 files changed, 0 insertions(+), 896 deletions(-) delete mode 100644 solenv/bin/modules/installer/configuration.pm diff --git a/solenv/bin/modules/installer/configuration.pm b/solenv/bin/modules/installer/configuration.pm deleted file mode 100644 index 0fb587f..000 --- a/solenv/bin/modules/installer/configuration.pm +++ /dev/null @@ -1,896 +0,0 @@ -#* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# http://www.openoffice.org/license.html -# for a copy of the LGPLv3 License. -# -#* - -package installer::configuration; - -use Cwd; -use installer::converter; -use installer::existence; -use installer::exiter; -use installer::files; -use installer::globals; -use installer::logger; -use installer::remover; -use installer::systemactions; - - -# Getting package from configurationitem (for instance: org.openoffice.Office) -# Getting name from configurationitem (for instance: Common) - - -sub analyze_path_of_configurationitem -{ -my ($configurationitemsref) = @_; - -if ( $installer::globals::debug ) { installer::logger::debuginfo(installer::configuration::analyze_path_of_configurationitem : $#{$configurationitemsref}); } - -my ($startpath, $nodes, $name, $packagename, $onenode, $first, $second, $third, $bracketnode); - -for ( my $i = 0; $i = $#{$configurationitemsref}; $i++ ) -{ -my $oneconfig = ${$configurationitemsref}[$i]; -my $path = $oneconfig-{'Path'}; - -installer::remover::remove_leading_and_ending_slashes(\$path); # in scp are some path beginning with / - -if ( $path =~ /^\s*(.*?)\/(.*)\s*$/ ) -{ -$startpath = $1; -$nodes = $2; -} -else -{ -installer::exiter::exit_program(ERROR: Unknown format of ConfigurationItem path: $path, analyze_path_of_configurationitem); -} - -# Startpath is now: org.openoffice.Setup -# Nodes is now: Office/Factories/com.sun.star.chart.ChartDocument - -# Dividing the startpath into package (org.openoffic) and name (Setup). - -$oneconfig-{'startpath'} = $startpath; # saving the startpath into the hash - -if ( $startpath =~ /^\s*(\S*)\.(\S*?)\s*$/ ) -{ -$packagename = $1; -$name = $2; -$oneconfig-{'name'} = $name; -$oneconfig-{'packagename'} = $packagename; -} -else -{ -installer::exiter::exit_program(ERROR: Unknown format of ConfigurationItem startpath: $startpath, analyze_path_of_configurationitem); -} - -# Collecting all nodes - -installer::remover::remove_leading_and_ending_slashes(\$nodes); - -my $counter = 1; - -# Attention: Do not trust the slash -# Filters/Filter['StarWriter 5.0 Vorlage/Template'] -# Menus/New/*['m10']/Title - -if ( $nodes =~ /^(.*\[\')(.*\/.*)(\'\].*)$/ ) -{ -$first = $1; -$second = $2; -$third = $3; - -$second =~ s/\//SUBSTITUTEDSLASH/g; # substituting / to SUBSTITUTEDSLASH -$nodes = $first . $second . $third; -} - -while ( $nodes =~ /\// ) -{ -if ($nodes =~ /^\s*(.*?)\/(.*)\s*$/ ) -{ -$onenode = $1; -$nodes = $2
[Libreoffice] [PATCH] Remove --server mode from build.pl
Dropping the --server switch and supporting code, as part of fdo#39747. I didn't see any problems running autogen / make / make dev-install after this. (Ubuntu 11.04 build env.) There were some other dead function in there from before, but I'll send a separate patch since they were unrelated to the --server switch. LGPLv3+/MPL Jordan Ayers From 5626f1468f646d118d51b8c3ac1f6bfb1e2a2b35 Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Wed, 10 Aug 2011 08:17:55 -0500 Subject: [PATCH] Remove --server mode and supporting code from build.pl. --- bootstrap.1|2 - set_soenv.in |4 +- solenv/bin/build.pl| 290 +- solenv/bin/build_client.pl | 436 4 files changed, 6 insertions(+), 726 deletions(-) delete mode 100755 solenv/bin/build_client.pl diff --git a/bootstrap.1 b/bootstrap.1 index 069b995..19a9d1e 100755 --- a/bootstrap.1 +++ b/bootstrap.1 @@ -11,7 +11,6 @@ fi unalias mkout unalias deliver unalias build -unalias build_client unalias zipdep # executables are *.exe for WNT. This variable is necessary since Cygwin 1.5.x @@ -71,7 +70,6 @@ fi #make sure build.pl is executable chmod +x $SRC_ROOT/solenv/bin/build.pl -chmod +x $SRC_ROOT/solenv/bin/build_client.pl chmod +x $SRC_ROOT/solenv/bin/zipdep.pl chmod +x $SRC_ROOT/solenv/bin/gccinstlib.pl diff --git a/set_soenv.in b/set_soenv.in index 729241c..1a9539d 100755 --- a/set_soenv.in +++ b/set_soenv.in @@ -89,7 +89,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL, # IId. Declaring the aliases. #--- # -my ( $dmake, $build, $build_client, $mkout, $deliver, $zipdep ); +my ( $dmake, $build, $mkout, $deliver, $zipdep ); # #- @@ -1455,7 +1455,6 @@ else $mkout = 'perl $SOLARENV/bin/mkout.pl'; $deliver = 'perl $SOLARENV/bin/deliver.pl'; $build = 'perl $SOLARENV/bin/build.pl'; - $build_client= 'perl $SOLARENV/bin/build_client.pl'; $zipdep = 'perl $SOLARENV/bin/zipdep.pl'; # @@ -2106,7 +2105,6 @@ ToFile( Don't set aliases when bootstrapping, $empty, c ); ToFile( alias mkout, $mkout, a ); ToFile( alias deliver, $deliver, a ); ToFile( alias build, $build, a ); -ToFile( alias build_client,$build_client, a ); ToFile( alias zipdep, $zipdep,a ); # on Solaris, MacOSX and FreeBSD, set GNUCOPY and GNUPATCH diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index cc53a5d..fdf316b 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -159,20 +159,12 @@ my $stop_build_on_error = 0; # for multiprocessing mode: do not build further module if there is an error my $interactive = 0; # for interactive mode... (for testing purpose enabled by default) my $parent_process = 1; -my $server_mode = 0; -my $setenv_string = ''; # string for configuration of the client environment -my $ports_string = ''; # string with possible ports for server my @server_ports = (); my $html_port = 0; -my $server_socket_obj = undef; # socket object for server my $html_socket_obj = undef; # socket object for server -my %clients_jobs = (); -my %clients_times = (); my $client_timeout = 0; # time for client to build (in sec)... # The longest time period after that # the server considered as an error/client crash -my %lost_client_jobs = (); # hash containing lost jobs -my %job_jobdir = (); # hash containing job-dir pairs my $reschedule_queue = 0; my %module_build_queue = (); my %reversed_dependencies = (); @@ -688,9 +680,6 @@ sub build_all { build_multiprocessing(); return; }; -if ($server_mode) { -run_server(); -}; while ($prj = pick_prj_to_build(\%global_deps_hash)) { if (!defined $dead_parents{$prj}) { if (scalar keys %broken_build) { @@ -719,11 +708,7 @@ sub build_all { my $info_hash = $html_info{$initial_module}; $$info_hash{DIRS} = check_deps_hash(\%local_deps_hash, $initial_module); $module_by_hash{\%local_deps_hash} = $initial_module; -if ($server_mode) { -run_server(); -} else { -build_dependent(\%local_deps_hash); -}; +build_dependent(\%local_deps_hash); }; }; @@ -1283,7 +1268,7 @@ sub find_indep_prj { $all_dependent = 1; handle_dead_children(0) if ($processes_to_run); my $children = children_number(); -return '' if (!$server_mode $children ($children = $processes_to_run)); +return '' if ($children ($children = $processes_to_run)); $dependencies = shift; if (scalar keys %$dependencies
Re: [Libreoffice] [PUSHED] Re: [PATCH] Accelerate perl installer: optimize installer::scriptitems::optimize_list().
On Thu, Dec 2, 2010 at 3:23 AM, Caolán McNamara caol...@redhat.com wrote: On Tue, 2010-11-30 at 23:02 -0600, Jordan Ayers wrote: Another performance improvement for the perl installer. This one brought my ./bin/ooinstall -l dirname time down from about 4 1/2 minutes to under 4 minutes. Oky doky, pushed. My perl foo is low, but the installer did seem to work as normal for me, so in it goes. C. (I just subscribed as well, so I am replying here instead of to the new thread by Alex / Michael.) Alex, Thanks for the review and notes. I see how the split / join changes are more elegant, though I'll have to read up a bit for the usage of 'grep' to sink in. I'm not a perl expert, just have had to learn it on the job over the last few years. Since I'm also not very familiar with all the details the installer is handling, I've been focusing on incremental cleanup items. (Although in this case, I suspect that re-deriving the program would be faster, if someone had enough familiarity with the install process to do so.) Jordan Ayers ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] Accelerate perl installer: optimize installer::scriptitems::optimize_list().
Another performance improvement for the perl installer. This one brought my ./bin/ooinstall -l dirname time down from about 4 1/2 minutes to under 4 minutes. (Warning: that number is in the right ballpark, but is from a very small number of install runs.) The only functional change was to trim all leading/trailing whitespace from the list elements before eliminating duplicates (the old function only checks half of the leading/trailing edges, and which edge depends on where in the list the element came from; I couldn't find a good reason for that pattern, so I made it uniform). I'm finding the NYTProf module useful for finding performance bottlenecks in the perl code, although on my system the times seem to bloat out by a factor of 3 or so with the profiler running. LGPLv3+/MPL. Jordan Ayers From 7d6e4413d90f9e7bc6451b89fe3c481a303279de Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Tue, 30 Nov 2010 22:36:28 -0600 Subject: [PATCH] Accelerate perl installer: optimize installer::scriptitems::optimize_list(). Replace call to convert_stringlist_into_hash with a simpler method using split; this requires significantly fewer data copy operations. The new routine strips all whitespace from the front and end of each value; the old function call stripped leading whitespace, most of the time. --- solenv/bin/modules/installer/scriptitems.pm | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm index b96b77b..6ba76fe 100644 --- a/solenv/bin/modules/installer/scriptitems.pm +++ b/solenv/bin/modules/installer/scriptitems.pm @@ -2031,11 +2031,16 @@ sub quoting_illegal_filenames sub optimize_list { my ( $longlist ) = @_; - +my %tmpHash; my $shortlist = ; -my $hashref = installer::converter::convert_stringlist_into_hash(\$longlist, ,); -foreach my $key (sort keys %{$hashref} ) { $shortlist = $shortlist,$key; } -$shortlist =~ s/^\s*\,//; + +$longlist =~ s/^\s*|\s*$//g; +$longlist =~ s/\s*,\s*/,/g; + +foreach ( split /,/, $longlist ) { $tmpHash{$_} = 1; } + +foreach (sort keys %tmpHash ) { $shortlist .= $_,; } +chop( $shortlist ); return $shortlist; } -- 1.7.1 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] Perl Installer: Remove 'dead' code
This one is kind of in the 'accelerate perl installer' category. In early October, the build abort in these functions was disabled, with the end result that these functions are only collecting counts for the log. This patch removes those functions, assuming that the component count logs were only there for dealing with build aborts. Alternatively, if the counts are useful for debugging, I could change the comments and log messages to indicate that this is now effectively a logging function. In that case I would also suggest using the $installer::globals::debug flag to skip this routine for normal builds. LGPLv3+/MPL Jordan Ayers From 4f432b8b72ef38fcb272424912dfe7d688a05f93 Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Wed, 10 Nov 2010 21:26:46 -0600 Subject: [PATCH] Perl Installer: Remove disabled Win9x build guard. Remove the feature component counting routines. These were added to enforce a Win9x component count limit, but no longer do anything except collect and log counts. --- .../modules/installer/windows/featurecomponent.pm | 69 1 files changed, 0 insertions(+), 69 deletions(-) diff --git a/solenv/bin/modules/installer/windows/featurecomponent.pm b/solenv/bin/modules/installer/windows/featurecomponent.pm index 88269f0..f52032d 100644 --- a/solenv/bin/modules/installer/windows/featurecomponent.pm +++ b/solenv/bin/modules/installer/windows/featurecomponent.pm @@ -132,71 +132,6 @@ sub create_featurecomponent_table_from_registry_collector } # -# Collecting all feature that are listed in the featurecomponent table. -# - -sub collect_all_feature -{ -my ($featurecomponenttable) = @_; - -my @allfeature = (); - -for ( my $i = 3; $i = $#{$featurecomponenttable}; $i++ ) # beginning in line 4 -{ -my $oneline = ${$featurecomponenttable}[$i]; - -if ( $oneline =~ /^\s*(\S+)\s+(\S+)\s*$/ ) -{ -my $feature = $1; - -if (! installer::existence::exists_in_array($feature, \...@allfeature)) { push(@allfeature, $feature); } -} -} - -return \...@allfeature; -} - -# -# On Win98 and Win Me there seems to be the problem, that maximum 817 -# components can be added to a feature. Even if Windows Installer 2.0 -# is used. -# - -sub check_number_of_components_at_feature -{ -my ($featurecomponenttable) = @_; - -my $infoline = \nChecking number of components at features. Maximum is 817 (for Win 98 and Win Me)\n; -push(@installer::globals::logfileinfo, $infoline); - -my $allfeature = collect_all_feature($featurecomponenttable); - -for ( my $i = 0; $i = $#{$allfeature}; $i++ ) -{ -my $onefeature = ${$allfeature}[$i]; -my $featurecomponents = 0; - -for ( my $j = 0; $j = $#{$featurecomponenttable}; $j++ ) -{ -if ( ${$featurecomponenttable}[$j] =~ /^\s*\Q$onefeature\E\s+(\S+)\s*$/ ) { $featurecomponents++; } -} - -# if ( $featurecomponents 816 ) -# { -# installer::exiter::exit_program(ERROR: More than 816 components ($featurecomponents) at feature $onefeature. This causes problems on Win 98 and Win Me!, check_number_of_components_at_feature); -# } - -# Logging the result - -$infoline = Number of components at feature $onefeature : $featurecomponents\n; -push(@installer::globals::logfileinfo, $infoline); -} - -$infoline = \n; -push(@installer::globals::logfileinfo, $infoline); -} - -# # Creating the file FeatureC.idt dynamically # Content: # Feature Component @@ -228,10 +163,6 @@ sub create_featurecomponent_table # Additional components have to be added here -# Checking, whether there are more than 817 components at a feature - -check_number_of_components_at_feature(\...@featurecomponenttable); - # Saving the file my $featurecomponenttablename = $basedir . $installer::globals::separator . FeatureC.idt; -- 1.7.1 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] Remove wrapcmd from perl installer
Minor cleanup item I saw when preparing my last patches. LGPLv3+/MPL Jordan Ayers From c2c5af35636a6f1bfd9f69b39e9baddc7da2f894 Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Mon, 8 Nov 2010 19:56:49 -0600 Subject: [PATCH] Remove unused global from perl installer Per comments in globals.pm, remove wrapcmd and all references to it. --- solenv/bin/modules/installer/globals.pm |3 --- solenv/bin/modules/installer/servicesfile.pm | 10 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 7d85f73..3665367 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -531,9 +531,6 @@ BEGIN $isunix = 1; $iswin = 0; } -# WRAPCMD is gone - remove this and all related -# $installer::globals::wrapcmd entries -$wrapcmd = ; if ( $plat =~ /linux/i ) { $islinux = 1; } if ( $plat =~ /kfreebsd/i ) { $islinux = 1; } diff --git a/solenv/bin/modules/installer/servicesfile.pm b/solenv/bin/modules/installer/servicesfile.pm index c74073e..8dba6a9 100644 --- a/solenv/bin/modules/installer/servicesfile.pm +++ b/solenv/bin/modules/installer/servicesfile.pm @@ -167,7 +167,7 @@ sub call_regcomp my $error_occured = 0; -my $systemcall = $installer::globals::wrapcmd $$regcompfileref -register -r .fix_cygwin_path($servicesfile). -c . $installer::globals::quote . $filestring . $installer::globals::quote . -wop= . $installer::globals::quote . $urlprefix . $installer::globals::quote . 2\\1 |; +my $systemcall = $$regcompfileref -register -r .fix_cygwin_path($servicesfile). -c . $installer::globals::quote . $filestring . $installer::globals::quote . -wop= . $installer::globals::quote . $urlprefix . $installer::globals::quote . 2\\1 |; open (REG, $systemcall); while (REG) {push(@regcompoutput, $_); } @@ -229,7 +229,7 @@ sub register_javacomponents { my @regcompoutput = (); -my $systemcall = $installer::globals::wrapcmd $$regcompfileref -register -br .fix_cygwin_path($regcomprdb). -r .fix_cygwin_path($servicesfile). -c . $installer::globals::quote . $filestring . $installer::globals::quote . -l com.sun.star.loader.Java2 -wop= . $installer::globals::quote . $javaservicesurlprefix . $installer::globals::quote . -env:URE_INTERNAL_JAVA_DIR= . $installer::globals::quote . make_file_url($$ure_internal_java_dir_ref) . $installer::globals::quote . 2\\1 |; +my $systemcall = $$regcompfileref -register -br .fix_cygwin_path($regcomprdb). -r .fix_cygwin_path($servicesfile). -c . $installer::globals::quote . $filestring . $installer::globals::quote . -l com.sun.star.loader.Java2 -wop= . $installer::globals::quote . $javaservicesurlprefix . $installer::globals::quote . -env:URE_INTERNAL_JAVA_DIR= . $installer::globals::quote . make_file_url($$ure_internal_java_dir_ref) . $installer::globals::quote . 2\\1 |; open (REG, $systemcall); while (REG) {push(@regcompoutput, $_); } @@ -276,7 +276,7 @@ sub fix_cygwin_path { my ( $path ) = @_; -if ( $installer::globals::iswin eq 1 $installer::globals::wrapcmd eq ) +if ( $installer::globals::iswin eq 1 ) { $path = qx{cygpath -m $path}; chomp($path); @@ -365,7 +365,7 @@ sub register_pythoncomponents my @regcompoutput = (); -$systemcall = $installer::globals::wrapcmd $$regcompfileref -register +$systemcall = $$regcompfileref -register . -br . fix_cygwin_path($$typesrdbref) . -br . fix_cygwin_path($$pyunoservicesrdbref) . -r . fix_cygwin_path($servicesfile) @@ -715,7 +715,7 @@ sub prepare_regcomp_rdb chdir($to); -my $systemcall = $installer::globals::wrapcmd $regcompfile -register -s -r . fix_cygwin_path($regcomprdb) . -c $libfilename; +my $systemcall = $regcompfile -register -s -r . fix_cygwin_path($regcomprdb) . -c $libfilename; my $returnvalue = system($systemcall); -- 1.7.1 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PATCH] build.pl dead code, spelling fixes
Miscellaneous cleanup to build.pl. Mostly removal of dead code, with a few spelling / German-English fixes. LGPLv3+/MPL Jordan Ayers From bcebd3c5cf9c62aa3321dca253a7d61bded6cde9 Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Wed, 3 Nov 2010 23:35:04 -0500 Subject: [PATCH] Cleanup build.pl Remove commented out code. Remove $html_last_updated (unused). Correct a few spelling mistakes. Translate a few bits of German. --- solenv/bin/build.pl | 124 +++--- 1 files changed, 18 insertions(+), 106 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 0769862..f83aa4a 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -87,7 +87,7 @@ # # # -# Globale Variablen # +# Global Variables# # # # @@ -151,7 +151,6 @@ %platforms = (); # platforms available or being working with %platforms_to_copy = (); # copy output trees for the platforms when --prepare $tmp_dir = get_tmp_dir(); # temp directory for checkout and other actions -#$dmake_batch = undef; # @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names %build_list_paths = (); # build lists names %build_lists_hash = (); # hash of arrays $build_lists_hash{$module} = \($path, $xml_list_object) @@ -168,15 +167,13 @@ %build_in_progress_shown = (); # hash of modules being built, # and shown last time (to keep order) $build_time = time; -$html_last_updated = 0; %jobs_hash = (); $html_path = undef; $build_finished = 0; $html_file = ''; -%had_error = (); # hack for misteriuos windows problems - try run dmake 2 times if first time there was an error +%had_error = (); # hack for mysterious windows problems - try run dmake 2 times if first time there was an error $mkout = CorrectPath($ENV{SOLARENV}/bin/mkout.pl); %weights_hash = (); # hash contains info about how many modules are dependent from one module -#%weight_stored = (); $grab_output = 1; $stop_build_on_error = 0; # for multiprocessing mode: do not build further module if there is an error $interactive = 0; # for interactive mode... (for testing purpose enabled by default) @@ -204,7 +201,7 @@ my %add_to_config = (); my %remove_from_config = (); my $clear_config = 0; -my $finisched_children = 0; +my $finished_children = 0; my $debug = 0; %module_deps_hash_pids = (); my @argv = @ARGV; @@ -220,7 +217,6 @@ zenity_open(); zenity_tooltip(Starting build.); -#my $temp_html_file = CorrectPath($tmp_dir. '/' . $ENV{INPATH}. '.build.html'); get_build_modes(); %deliver_env = (); if ($prepare) { @@ -265,7 +261,6 @@ %prj_platform = (); $check_error_string = ''; $dmake = ''; -#$dmake_bin = ''; $dmake_args = ''; $echo = ''; $new_line = \n; @@ -285,8 +280,6 @@ } else { print_error (Cannot open file $cmd_file); }; -#} elsif ($show) { -#select STDOUT; }; print $new_line; @@ -300,8 +293,6 @@ } if (scalar keys %broken_build) { cancel_build(); -#} elsif (!$custom_job $post_custom_job) { -#do_post_custom_job(CorrectPath($StandDir.$initial_module)); }; print_warnings(); if (scalar keys %active_modules) { @@ -420,7 +411,6 @@ sub start_html_message_trigger { if ($child_id) { # parent -# print started listener trigger\n; } else { my $buffer_size = 1024; my $buffer; @@ -437,7 +427,6 @@ sub start_html_message_trigger { if (connect(SOCKET, $paddr)) { $full_buffer .= \n; syswrite SOCKET, $full_buffer, length $full_buffer; -#close SOCKET or die Child close socket: $!; } else { die Child connect: $!; }; @@ -447,7 +436,6 @@ sub start_html_message_trigger { }; sub get_html_orders { -#print Parent gonna read\n; return if (!$interactive); my $buffer_size = 1024; my $buffer; @@ -455,10 +443,9 @@ sub get_html_orders { my $full_buffer = ''; my %modules_to_rebuild = (); my %modules_to_delete = (); -while ($rv = sysread(HTML_PIPE, $buffer, $buffer_size)) { -$full_buffer .= $buffer; -}; -#}; +while ($rv = sysread(HTML_PIPE, $buffer, $buffer_size)) { +$full_buffer .= $buffer; +}; my @html_messages = split(/\n/, $full_buffer); foreach (@html_messages) { if (/^html_port:(\d+)/) { @@ -491,7 +478,6 @@ sub get_html_orders { schedule_rebuild(\%modules_to_rebuild); generate_html_file(); }; -#print Parent got nothing to read\n; }; sub schedule_delete { @@ -643,7 +629,7 @@ sub expand_dependencies { # This procedure
[Libreoffice] [PATCH] EasyHacks: Accelerate Perl Installer
Hi, I was looking at the perl installer, and attached are patches to change most of the chmod system calls into calls to the built-in command. This change alone doesn't seem to make a big difference (it cut about 5 seconds off of a 4 1/2 minute run of ooinstall for me). The second patch includes the replacement of a couple of two-step chmod calls with a single built-in call; the original code indicated that it was a work-around for removing the sticky bit on Macs. I don't have a Mac to test that the new call handles sticky bits in the same way, but expect that it will from checking the current perlport doc. LGPLv3+/MPL. Jordan Ayers From 09210008700de4243b249e157a3df83a317bbac2 Mon Sep 17 00:00:00 2001 From: Jordan Ayers jordan.ay...@gmail.com Date: Sun, 7 Nov 2010 18:02:12 -0600 Subject: [PATCH 1/2] Perl Installer: Use built-in chmod Replace several system calls which performed single-file permission sets with the built-in chmod command. --- solenv/bin/modules/installer/copyproject.pm | 24 +--- solenv/bin/modules/installer/download.pm |6 ++ solenv/bin/modules/installer/epmfile.pm | 21 ++--- solenv/bin/modules/installer/javainstaller.pm |6 ++ solenv/bin/modules/installer/languagepack.pm |3 +-- solenv/bin/modules/installer/parameter.pm |3 +-- solenv/bin/modules/installer/simplepackage.pm | 12 +++- solenv/bin/modules/installer/worker.pm| 12 8 files changed, 24 insertions(+), 63 deletions(-) diff --git a/solenv/bin/modules/installer/copyproject.pm b/solenv/bin/modules/installer/copyproject.pm index 88f3b79..93f4d29 100644 --- a/solenv/bin/modules/installer/copyproject.pm +++ b/solenv/bin/modules/installer/copyproject.pm @@ -69,17 +69,14 @@ sub copy_project installer::systemactions::copy_one_file($source, $destination); -if ( $destination =~ /install\s*$/ ) +if ( $onefile-{'UnixRights'} ) { -my $localcall = chmod 775 $destination \\/dev\/null 2\\1; -system($localcall); +chmod oct($onefile-{'UnixRights'}), $destination; } - -if ( $onefile-{'UnixRights'} ) +elsif ( $destination =~ /install\s*$/ ) { -my $localcall = chmod $onefile-{'UnixRights'} $destination \\/dev\/null 2\\1; -system($localcall); -} +chmod 0775, $destination; +} } # copy ScpActions @@ -93,16 +90,13 @@ sub copy_project installer::systemactions::copy_one_file($source, $destination); -if ( $destination =~ /install\s*$/ ) +if ( $onefile-{'UnixRights'} ) { -my $localcall = chmod 775 $destination \\/dev\/null 2\\1; -system($localcall); +chmod oct($onefile-{'UnixRights'}), $destination; } - -if ( $onefile-{'UnixRights'} ) +elsif ( $destination =~ /install\s*$/ ) { -my $localcall = chmod $onefile-{'UnixRights'} $destination \\/dev\/null 2\\1; -system($localcall); +chmod 0775, $destination; } } diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm index 8e70bbb..7b30c43 100644 --- a/solenv/bin/modules/installer/download.pm +++ b/solenv/bin/modules/installer/download.pm @@ -118,8 +118,7 @@ sub save_script_file if ( ! $installer::globals::iswindowsbuild ) { -my $localcall = chmod 775 $newscriptfilename \\/dev\/null 2\\1; -system($localcall); +chmod 0775, $newscriptfilename; } return $newscriptfilename; @@ -339,8 +338,7 @@ sub tar_package push( @installer::globals::logfileinfo, $infoline); } -my $localcall = chmod 775 $tarfilename \\/dev\/null 2\\1; -$returnvalue = system($localcall); +chmod 0775, $tarfilename; return ( -s $tarfilename ); } diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm index 2af2f3c..0e1b18a 100644 --- a/solenv/bin/modules/installer/epmfile.pm +++ b/solenv/bin/modules/installer/epmfile.pm @@ -2875,23 +2875,7 @@ sub create_new_directory_structure } # Setting unix rights to 775 for $newdir (RPMS or packages) - -my $localcall = chmod 775 $newdir \\/dev\/null 2\\1; -my $callreturnvalue = system($localcall); - -my $callinfoline = Systemcall: $localcall\n; -push( @installer::globals::logfileinfo, $callinfoline); - -if ($callreturnvalue) -{ -$callinfoline = ERROR: Could not execute \$localcall\!\n; -push( @installer::globals::logfileinfo, $callinfoline); -} -else -{ -$callinfoline = Success: Executed \$localcall\ successfully!\n; -push( @installer::globals::logfileinfo, $callinfoline); -} +chmod 0775, $newdir