[Libreoffice-commits] .: solenv/bin

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Aug 18 20:03:28 PDT 2012


 solenv/bin/make_installer.pl            |   50 ---------
 solenv/bin/modules/installer/epmfile.pm |   26 -----
 solenv/bin/modules/installer/globals.pm |    5 
 solenv/bin/modules/installer/worker.pm  |  162 --------------------------------
 4 files changed, 1 insertion(+), 242 deletions(-)

New commits:
commit b5d1380f3a0c88fff40c9a7134e373f11ea03b9d
Author: Tim Retout <tim at retout.co.uk>
Date:   Sun Aug 19 03:50:12 2012 +0100

    installer: Remove code related to linuxlinkrpms.
    
    $installer::globals::linuxlinkrpms is always "", which means that
    $installer::globals::makelinuxlinkrpm is always 0.
    
    Change-Id: I4fc1fc8afc2bcff528e327a64a784020081c2262

diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 0da4dc5..1603c5d 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -1126,23 +1126,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
             # Debian allows no underline in package name
             if ( $installer::globals::debian ) { $packagename =~ s/_/-/g; }
 
-            my $linkaddon = "";
-            my $linkpackage = 0;
-            $installer::globals::add_required_package = "";
-            $installer::globals::linuxlinkrpmprocess = 0;
-
-            if ( $installer::globals::makelinuxlinkrpm )
-            {
-                my $oldpackagename = $packagename;
-                $installer::globals::add_required_package = $oldpackagename;    # the link rpm requires the non-linked version
-                if ( $installer::globals::languagepack ) { $packagename = $packagename . "_u"; }
-                elsif ( $installer::globals::helppack ) { $packagename = $packagename . "_v"; } # wtf...
-                else { $packagename = $packagename . "u"; }
-                $linkaddon = "_links";
-                $installer::globals::linuxlinkrpmprocess = 1;
-                $linkpackage = 1;
-            }
-
             ####################################################
             # Header for this package into log file
             ####################################################
@@ -1235,35 +1218,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
                 strip_libraries($filesinpackage, $languagestringref);
             }
 
-            ###############################################################
-            # Searching for files in $filesinpackage with flag LINUXLINK
-            ###############################################################
-
-            if (( $installer::globals::islinuxbuild ) && ( ! $installer::globals::simple )) # for rpms and debian packages
-            {
-                # special handling for all RPMs in $installer::globals::linuxlinkrpms
-
-                if ( $installer::globals::linuxlinkrpms =~ /\b$onepackagename\b/ )
-                {
-                    if ( $installer::globals::makelinuxlinkrpm )
-                    {
-                        $filesinpackage = \@installer::globals::linuxpatchfiles;
-                        $linksinpackage = \@installer::globals::linuxlinks;
-                        $installer::globals::makelinuxlinkrpm = 0;
-                        if ( $installer::globals::patch ) { $installer::globals::call_epm = 1; }     # enabling packing again
-                    }
-                    else
-                    {
-                        $filesinpackage = installer::worker::prepare_linuxlinkfiles($filesinpackage);
-                        $linksinpackage = installer::worker::prepare_forced_linuxlinkfiles($linksinpackage);
-                        $installer::globals::makelinuxlinkrpm = 1;
-                        $installer::globals::add_required_package = $packagename . "u";
-                        if ( $installer::globals::patch ) { $installer::globals::call_epm = 0; }     # no packing of core module in patch
-                        $shellscriptsfilename = ""; # shell scripts only need to be included into the link rpm
-                    }
-                }
-            }
-
             ###########################################
             # Simple installation mechanism
             ###########################################
@@ -1294,7 +1248,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
                 # Example for a link: l 000 root sys /usr/bin/linkname filename
                 # The source field specifies the file to link to
 
-                my $epmfilename = "epm_" . $onepackagename . $linkaddon . ".lst";
+                my $epmfilename = "epm_" . $onepackagename . ".lst";
 
                 installer::logger::print_message( "... creating epm list file $epmfilename ... \n" );
 
@@ -1418,8 +1372,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
 
             } # end of "if ( ! $installer::globals::simple )
 
-            if ( $installer::globals::makelinuxlinkrpm ) { $k--; }  # decreasing the counter to create the link rpm!
-
         }   # end of "for ( my $k = 0; $k <= $#{$packages}; $k++ )"
 
         ##############################################################
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index bc50aeb..36fd78d 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -511,7 +511,6 @@ sub create_epm_header
                 my $onereplaces = ${$allreplaces}[$i];
                 $onereplaces =~ s/\s*$//;
                 installer::packagelist::resolve_packagevariables(\$onereplaces, $variableshashref, 1);
-                if ( $installer::globals::linuxlinkrpmprocess ) { $onereplaces = $onereplaces . "u"; }
                 $line = "%replaces" . " " . $onereplaces . "\n";
                 push(@epmheader, $line);
 
@@ -578,7 +577,6 @@ sub create_epm_header
             my $oneprovides = ${$allprovides}[$i];
             $oneprovides =~ s/\s*$//;
             installer::packagelist::resolve_packagevariables(\$oneprovides, $variableshashref, 1);
-            if ( $installer::globals::linuxlinkrpmprocess ) { $oneprovides = $oneprovides . "u"; }
             $line = "%provides" . " " . $oneprovides . "\n";
             push(@epmheader, $line);
         }
@@ -588,8 +586,6 @@ sub create_epm_header
     {
         my $requiresstring = $onepackage->{$requires};
 
-        if ( $installer::globals::add_required_package ) { $requiresstring = $requiresstring . "," . $installer::globals::add_required_package; }
-
         # The requires string can contain the separator "," in the names (descriptions) of the packages
         # (that are required for Solaris depend files). Therefore "," inside such a description has to
         # masked with a backslash.
@@ -613,28 +609,6 @@ sub create_epm_header
             push(@epmheader, $line);
         }
     }
-    else
-    {
-        if ( $installer::globals::add_required_package )
-        {
-            my $requiresstring = $installer::globals::add_required_package;
-
-            my $replacementstring = "COMMAREPLACEMENT";
-            $requiresstring = installer::converter::replace_masked_separator($requiresstring, ",", "$replacementstring");
-            my $allrequires = installer::converter::convert_stringlist_into_array(\$requiresstring, ",");
-            installer::converter::resolve_masked_separator($allrequires, ",", $replacementstring);
-
-            for ( my $i = 0; $i <= $#{$allrequires}; $i++ )
-            {
-                my $onerequires = ${$allrequires}[$i];
-                $onerequires =~ s/\s*$//;
-                installer::packagelist::resolve_packagevariables(\$onerequires, $variableshashref, 0);
-
-                $line = "%requires" . " " . $onerequires . "\n";
-                push(@epmheader, $line);
-            }
-        }
-    }
 
     return \@epmheader;
 }
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index e77e8a4..cbfe885 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -192,13 +192,9 @@ BEGIN
     $packagename = "";
     $packagelist = "";
     $shiptestdirectory = "";
-    $makelinuxlinkrpm = 0;
-    $linuxlinkrpmprocess = 0;
-    $add_required_package = "";
     @linuxpatchfiles = ();
     $linuxlibrarybaselevel = "1";
     $linuxlibrarypatchlevel = "1.1";
-    @linuxlinks = ();
     $archiveformat = "";
     $updatelastsequence = 0;
     $updatesequencecounter = 0;
@@ -351,7 +347,6 @@ BEGIN
     @featurecollector =();
     $msiassemblyfiles = "";
     $macinstallfilename = "macinstall.ulf";
-    $linuxlinkrpms = "";
     $extensioninstalldir = "gid_Dir_Share_Extension_Install";
     @languagenames = ();
     @requiredpackages = ();
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 8ae8e62..309cf59 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -995,168 +995,6 @@ sub analyze_patch_files
 }
 
 ###########################################################
-# Renaming linux files with flag LINUXLINK
-###########################################################
-
-sub prepare_linuxlinkfiles
-{
-    my ( $filesref ) = @_;
-
-    @installer::globals::linuxlinks = (); # empty this array, because it could be already used
-    @installer::globals::linuxpatchfiles = (); # empty this array, because it could be already used
-    @installer::globals::allfilessav = (); # empty this array, because it could be already used. Required for forced links
-
-    my @filesarray = ();
-
-    for ( my $i = 0; $i <= $#{$filesref}; $i++ )
-    {
-        my $onefile = ${$filesref}[$i];
-        my %linkfilehash = ();
-        my $linkfile = \%linkfilehash;
-        installer::converter::copy_item_object($onefile, $linkfile);
-
-        my $ispatchfile = 0;
-        my $styles = "";
-        if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
-        if ( $styles =~ /\bPATCH\b/ ) { $ispatchfile = 1; }
-
-        # Collecting all files for the mechanism with forced links
-        # Saving a copy
-        my %copyfilehash = ();
-        my $copyfile = \%copyfilehash;
-        installer::converter::copy_item_object($onefile, $copyfile);
-        push( @installer::globals::allfilessav, $copyfile);
-
-        my $original_destination = $onefile->{'destination'};
-        # $onefile->{'destination'} is used in the epm list file. This value can be changed now!
-
-        if ( $ispatchfile ) { $onefile->{'destination'} = $onefile->{'destination'} . "\.$installer::globals::linuxlibrarypatchlevel"; }
-        else { $onefile->{'destination'} = $onefile->{'destination'} . "\.$installer::globals::linuxlibrarybaselevel"; }
-
-        my $infoline = "LINUXLINK: Changing file destination from $original_destination to $onefile->{'destination'} !\n";
-        push( @installer::globals::logfileinfo, $infoline);
-
-        # all files without PATCH flag are included into the RPM
-        if ( ! $ispatchfile ) { push( @filesarray, $onefile); }
-        else { push( @installer::globals::linuxpatchfiles, $onefile); }
-
-        # Preparing the collector for the links
-        # Setting the new file name as destination of the link
-        my $linkdestination = $linkfile->{'Name'};
-        installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$linkdestination);
-        if ( $ispatchfile ) { $linkfile->{'destinationfile'} = $linkdestination . "\.$installer::globals::linuxlibrarypatchlevel"; }
-        else { $linkfile->{'destinationfile'} = $linkdestination . "\.$installer::globals::linuxlibrarybaselevel"; }
-        push( @installer::globals::linuxlinks, $linkfile );
-
-        $infoline = "LINUXLINK: Created link: $linkfile->{'destination'} pointing to $linkfile->{'destinationfile'} !\n";
-        push( @installer::globals::logfileinfo, $infoline);
-    }
-
-    return \@filesarray;
-}
-
-###########################################################
-# Adding links into "u-RPMs", that have the flag
-# FORCE_INTO_UPDATE_PACKAGE
-# This is only relevant for Linux
-###########################################################
-
-sub prepare_forced_linuxlinkfiles
-{
-    my ( $linksref ) = @_;
-
-    my @linksarray = ();
-
-    for ( my $i = 0; $i <= $#{$linksref}; $i++ )
-    {
-        my $onelink = ${$linksref}[$i];
-
-        my $isforcedlink = 0;
-        my $styles = "";
-        if ( $onelink->{'Styles'} ) { $styles = $onelink->{'Styles'}; }
-        if ( $styles =~ /\bFORCE_INTO_UPDATE_PACKAGE\b/ ) { $isforcedlink = 1; }
-
-        if ( $isforcedlink )
-        {
-            my $fileid = "";
-
-            if ( $onelink->{'ShortcutID'} )
-            {
-                $fileid = $onelink->{'ShortcutID'};
-
-                my $searchedlinkfile = find_file_by_id($linksref, $fileid);
-
-                # making a copy!
-                my %linkfilehash = ();
-                my $linkfile = \%linkfilehash;
-                installer::converter::copy_item_object($searchedlinkfile, $linkfile);
-
-                $linkfile->{'Name'} = $onelink->{'Name'};
-                $linkfile->{'destinationfile'} = $linkfile->{'destination'};
-                my $linkdestination = $linkfile->{'destinationfile'};
-                installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$linkdestination);
-                $linkfile->{'destinationfile'} = $linkdestination;
-
-                my $localdestination = $linkfile->{'destination'};
-                # Getting the path
-                installer::pathanalyzer::get_path_from_fullqualifiedname(\$localdestination);
-                $localdestination =~ s/\Q$installer::globals::separator\E\s*$//;
-                $linkfile->{'destination'} = $localdestination . $installer::globals::separator . $onelink->{'Name'};
-
-                $infoline = "Forced link into update file: $linkfile->{'destination'} pointing to $linkfile->{'destinationfile'} !\n";
-                push( @installer::globals::logfileinfo, $infoline);
-
-                # The file, defined by the link, has to be included into the
-                # link array @installer::globals::linuxlinks
-                push( @installer::globals::linuxlinks, $linkfile );
-            }
-
-            if ( $onelink->{'FileID'} )
-            {
-                $fileid = $onelink->{'FileID'};
-
-                my $searchedlinkfile = find_file_by_id(\@installer::globals::allfilessav, $fileid);
-
-                # making a copy!
-                my %linkfilehash = ();
-                my $linkfile = \%linkfilehash;
-                installer::converter::copy_item_object($searchedlinkfile, $linkfile);
-
-                $linkfile->{'Name'} = $onelink->{'Name'};
-                $linkfile->{'destinationfile'} = $linkfile->{'destination'};
-                my $linkdestination = $linkfile->{'destinationfile'};
-                installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$linkdestination);
-                $linkfile->{'destinationfile'} = $linkdestination;
-
-                my $localdestination = $linkfile->{'destination'};
-                # Getting the path
-                installer::pathanalyzer::get_path_from_fullqualifiedname(\$localdestination);
-                $localdestination =~ s/\Q$installer::globals::separator\E\s*$//;
-                $linkfile->{'destination'} = $localdestination . $installer::globals::separator . $onelink->{'Name'};
-
-                $infoline = "Forced link into update file: $linkfile->{'destination'} pointing to $linkfile->{'destinationfile'} !\n";
-                push( @installer::globals::logfileinfo, $infoline);
-
-                # The file, defined by the link, has to be included into the
-                # link array @installer::globals::linuxlinks
-                push( @installer::globals::linuxlinks, $linkfile );
-             }
-
-            if ( $fileid eq "" ) { installer::exiter::exit_program("ERROR: No FileID assigned to forced link $onelink->{'gid'} !", "prepare_forced_linuxlinkfiles"); }
-
-        }
-        else
-        {
-            # Links with flag FORCE_INTO_UPDATE_PACKAGE are forced into "u"-RPM. All other
-            # links are included into the non-"u"-package.
-            push( @linksarray, $onelink );
-        }
-    }
-
-    return \@linksarray;
-}
-
-###########################################################
 # reorganizing the patchfile content,
 # sorting for directory to decrease the file size
 ###########################################################


More information about the Libreoffice-commits mailing list