[Libreoffice-commits] .: 2 commits - solenv/bin

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Fri Aug 12 22:19:54 PDT 2011


 solenv/bin/build.pl |  130 ----------------------------------------------------
 1 file changed, 2 insertions(+), 128 deletions(-)

New commits:
commit 1fc2490f0da61adc616ac2c4670c9189afd557a8
Author: Jordan Ayers <jordan.ayers at gmail.com>
Date:   Fri Aug 12 22:02:51 2011 -0500

    Remove dead command line switch from solenv/bin/build.pl (--dontgraboutput)

diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 7840704..13e3ea7 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -153,7 +153,6 @@
     my %had_error = (); # hack for mysterious windows problems - try run dmake 2 times if first time there was an error
     my $mkout = correct_path("$ENV{SOLARENV}/bin/mkout.pl");
     my %weights_hash = (); # hash contains info about how many modules are dependent from one module
-    my $grab_output = 1;
     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;
@@ -1304,7 +1303,7 @@ sub print_error {
 
 sub usage {
     print STDERR "\nbuild\n";
-    print STDERR "Syntax:    build    [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches prj_name1[:prj_name2] [--skip prj_name1[:prj_name2] [prj_name3 [...]] [prj_name3 [...]|-b] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--exclude_branch_from prj_name1[:prj_name2] [prj_name3 [...]]] [--interactive] [--verbose]\n";
+    print STDERR "Syntax:    build    [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches prj_name1[:prj_name2] [--skip prj_name1[:prj_name2] [prj_name3 [...]] [prj_name3 [...]|-b] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--exclude_branch_from prj_name1[:prj_name2] [prj_name3 [...]]] [--interactive] [--verbose]\n";
     print STDERR "Example1:    build --from sfx2\n";
     print STDERR "                     - build all projects dependent from sfx2, starting with sfx2, finishing with the current module\n";
     print STDERR "Example2:    build --all:sfx2\n";
@@ -1331,7 +1330,6 @@ sub usage {
     print STDERR "        --html       - generate html page with build status\n";
     print STDERR "                       file named $ENV{INPATH}.build.html will be generated in $ENV{SOLARSRC}\n";
     print STDERR "          --html_path      - set html page path\n";
-    print STDERR "          --dontgraboutput - do not grab console output when generating html page\n";
     print STDERR "        --stoponerror      - stop build when error occurs (for mp builds)\n";
     print STDERR "        --interactive      - start interactive build process (process can be managed via html page)\n";
     print STDERR "        --verbose          - generates a detailed output of the build process\n";
@@ -1347,7 +1345,7 @@ sub usage {
 # Get all options passed
 #
 sub get_options {
-    my ($arg, $dont_grab_output);
+    my $arg;
     while ($arg = shift @ARGV) {
         $arg =~ /^-P$/            and $processes_to_run = shift @ARGV     and next;
         $arg =~ /^-P(\d+)$/            and $processes_to_run = $1 and next;
@@ -1386,7 +1384,6 @@ sub get_options {
         $arg =~ /^-h$/        and usage()                            and do_exit(0);
         $arg =~ /^--ignore$/        and $ignore = 1                            and next;
         $arg =~ /^--html$/        and $html = 1                            and next;
-        $arg =~ /^--dontgraboutput$/        and $dont_grab_output = 1      and next;
         $arg =~ /^--html_path$/ and $html_path = shift @ARGV  and next;
         $arg =~ /^-i$/        and $ignore = 1                            and next;
         $arg =~ /^--version$/   and do_exit(0);
@@ -1404,12 +1401,10 @@ sub get_options {
     };
     if (!$html) {
         print_error("\"--html_path\" switch is used only with \"--html\"") if ($html_path);
-        print_error("\"--dontgraboutput\" switch is used only with \"--html\"") if ($dont_grab_output);
     };
     if ((scalar keys %exclude_branches) && !$build_all_parents) {
         print_error("\"--exclude_branch_from\" is not applicable for one module builds!!");
     };
-    $grab_output = 0 if ($dont_grab_output);
     print_error('Switches --with_branches and --all collision') if ($build_from_with_branches && $build_all_cont);
     print_error('Switch --skip is for building multiple modules only!!') if ((scalar keys %skip_modules) && (!$build_all_parents));
     print_error('Switches --with_branches and --since collision') if ($build_from_with_branches && $build_since);
commit 47872cc7ad29a73d273e8857097b550a9abe2f73
Author: Jordan Ayers <jordan.ayers at gmail.com>
Date:   Thu Aug 11 07:57:33 2011 -0500

    Remove dead code from solenv/bin/build.pl
    
    Remove several unused functions, and an impossible warning.

diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 9c710fe..7840704 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -59,7 +59,6 @@
     if (defined $ENV{verbose} || defined $ENV{VERBOSE}) {
         $verbose_mode = ($ENV{verbose} =~ /^t\S*$/i);
     }
-    my $enable_multiprocessing = 1;
 
     ### for XML file format
     eval { require XMLBuildListParser; import XMLBuildListParser; };
@@ -360,35 +359,6 @@ sub start_html_listener {
     } while(1);
 };
 
-sub start_html_message_trigger {
-    my $child_id=fork(); ### VG: for windows there is a "simulation of the "fork"", no new procs... One can use Win32::Process::Create
-
-    if ($child_id) {
-        # parent
-    } else {
-        my $buffer_size = 1024;
-        my $buffer;
-        my $rv;
-        my $full_buffer = '';
-        my %modules_to_rebuild = ();
-        my $paddr;
-        while ($rv = sysread(HTML_PIPE, $buffer, $buffer_size)) {
-            $full_buffer .= $buffer;
-        };
-        if (length $full_buffer) {
-            print "**********Got message $full_buffer\n";
-            socket(SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or die "socket: $!";
-            if (connect(SOCKET, $paddr)) {
-                $full_buffer .= "\n";
-                syswrite SOCKET, $full_buffer, length $full_buffer;
-            } else {
-                die "Child connect: $!";
-            };
-        }
-        _exit(0);
-    };
-};
-
 sub get_html_orders {
     return if (!$interactive);
     my $buffer_size = 1024;
@@ -1312,18 +1282,6 @@ sub get_dependency_array {
     return @dependencies;
 };
 
-
-#
-# Getting current directory list
-#
-sub get_directory_list {
-    my $path = shift;
-    opendir(CurrentDirList, $path);
-    my @directory_list = readdir(CurrentDirList);
-    closedir(CurrentDirList);
-    return @directory_list;
-};
-
 sub print_error {
     my $message = shift;
     my $force = shift;
@@ -1467,9 +1425,6 @@ sub get_options {
         if ($ignore && !$html) {
             print_error("Cannot ignore errors in multiprocessing build");
         };
-        if (!$enable_multiprocessing) {
-            print_error("Cannot load Win32::Process module for multiprocessing build");
-        };
     } elsif ($stop_build_on_error) {
         print_error("Switch --stoponerror is only for multiprocessing builds");
     };
@@ -1518,25 +1473,6 @@ sub get_dmake_args {
 };
 
 #
-# get all options without '-'
-#
-sub get_switch_options {
-    my $string = '';
-    my $option = '';
-    while ($option = shift @ARGV) {
-        if (!($option =~ /^-+/)) {
-            $string .= '-' . $option;
-            $string .= ' ';
-        } else {
-            unshift(@ARGV, $option);
-            last;
-        };
-    };
-    $string =~ s/\s$//;
-    return $string;
-};
-
-#
 # cancel build when one of children has error exit code
 #
 sub cancel_build {
@@ -2018,20 +1954,6 @@ sub zenity_message {
     };
 };
 
-sub are_all_dependent {
-    my $build_queue = shift;
-    my $folder = '';
-    my $first_candidate = undef;
-    foreach my $prj (keys %$build_queue) {
-        $folder = find_indep_prj($projects_deps_hash{$prj});
-        $first_candidate = $folder if (!defined $first_candidate);
-    };
-    $folder = $first_candidate;
-    return '' if ($first_candidate);
-    return '1';
-};
-
-
 #
 # Procedure removes output tree from the module (without common trees)
 #
@@ -2119,12 +2041,6 @@ sub retrieve_build_list {
     return undef;
 };
 
-sub fix_permissions {
-     my $file = $File::Find::name;
-     return unless -f $file;
-     chmod '0664', $file;
-};
-
 sub prepare_build_from_with_branches {
     my ($full_deps_hash, $reversed_full_deps_hash) = @_;
     foreach my $prerequisite (keys %$full_deps_hash) {
@@ -2397,43 +2313,6 @@ sub get_solar_vars {
 }
 
 #
-# Procedure renames <module>.lnk (.link) into <module>
-#
-sub get_current_module {
-    my $module_name = shift;
-    my $link_name = $module_name . '.lnk';
-    $link_name .= '.link' if (-e $workspace_path.$module_name . '.link');
-    chdir $workspace_path;
-    getcwd();
-    print "\nBreaking link to module $module_name";
-    my $result = rename $link_name, $module_name;
-    if ( ! $result ) {
-        print_error("Cannot rename $module_name: $!\n");
-    }
-    if ( $initial_module eq $link_name) {
-        $initial_module = $module_name;
-    }
-    chdir $module_name;
-    getcwd();
-};
-
-sub check_dir {
-    my $start_dir = getcwd();
-    my @dir_entries = split(/[\\\/]/, $ENV{PWD});
-    my $current_module = $dir_entries[$#dir_entries];
-    if (($current_module =~ /(\.lnk)$/) || ($current_module =~ /(\.link)$/)) {
-        $current_module = $`;
-        # we're dealing with a link => fallback to SOLARSRC under UNIX
-        $workspace_path = $ENV{SOLARSRC}.'/';
-        get_current_module($current_module);
-        return;
-    } else {
-        chdir $start_dir;
-        getcwd();
-    };
-};
-
-#
 # Store all available build modi in %build_modes
 #
 sub get_build_modes {


More information about the Libreoffice-commits mailing list