xpdinstaller.pm (b274bc22) xpdinstaller.pm (0374af79)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 582 unchanged lines hidden (view full) ---

591 $ENV{LD_LIBRARY_PATH} = "$ld_library_backup:$sysbase/lib";
592 }
593 }
594 my ($rpmout, $error) = make_systemcall_allowing_error($systemcall, 0, 1);
595 $ENV{LD_LIBRARY_PATH} = $ld_library_backup;
596 # Evaluating an error, because of rpm problems with removed LD_LIBRARY_PATH
597 if ( $error )
598 {
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 582 unchanged lines hidden (view full) ---

591 $ENV{LD_LIBRARY_PATH} = "$ld_library_backup:$sysbase/lib";
592 }
593 }
594 my ($rpmout, $error) = make_systemcall_allowing_error($systemcall, 0, 1);
595 $ENV{LD_LIBRARY_PATH} = $ld_library_backup;
596 # Evaluating an error, because of rpm problems with removed LD_LIBRARY_PATH
597 if ( $error )
598 {
599 installer::logger::print_message( "... trying /usr/bin/rpm ...\n" );
599 $installer::logger::Info->print("... trying /usr/bin/rpm ...\n");
600 my $systemcall = "/usr/bin/rpm -qp --queryformat \"\[\%\{FILESIZES\}\\n\]\" $packagename 2\>\&1 |";
601 ($rpmout, $error) = make_systemcall_allowing_error($systemcall, 0, 0);
602 if ( $error ) { installer::exiter::exit_program("ERROR: rpm failed to query package!", "get_size_value"); }
603 }
604 $value = do_sum($rpmout); # adding all filesizes in bytes
605 $value = $value/1000;
606
607 my $ganzzahl = int $value;

--- 121 unchanged lines hidden (view full) ---

729 $ENV{LD_LIBRARY_PATH} = "$ld_library_backup:$sysbase/lib";
730 }
731 }
732 my ($returnarray, $error) = make_systemcall_allowing_error($systemcall, 0, 1);
733 $ENV{LD_LIBRARY_PATH} = $ld_library_backup;
734 # Evaluating an error, because of rpm problems with removed LD_LIBRARY_PATH
735 if ( $error )
736 {
600 my $systemcall = "/usr/bin/rpm -qp --queryformat \"\[\%\{FILESIZES\}\\n\]\" $packagename 2\>\&1 |";
601 ($rpmout, $error) = make_systemcall_allowing_error($systemcall, 0, 0);
602 if ( $error ) { installer::exiter::exit_program("ERROR: rpm failed to query package!", "get_size_value"); }
603 }
604 $value = do_sum($rpmout); # adding all filesizes in bytes
605 $value = $value/1000;
606
607 my $ganzzahl = int $value;

--- 121 unchanged lines hidden (view full) ---

729 $ENV{LD_LIBRARY_PATH} = "$ld_library_backup:$sysbase/lib";
730 }
731 }
732 my ($returnarray, $error) = make_systemcall_allowing_error($systemcall, 0, 1);
733 $ENV{LD_LIBRARY_PATH} = $ld_library_backup;
734 # Evaluating an error, because of rpm problems with removed LD_LIBRARY_PATH
735 if ( $error )
736 {
737 installer::logger::print_message( "... trying /usr/bin/rpm ...\n" );
737 $installer::logger::Info->print("... trying /usr/bin/rpm ...\n");
738 my $systemcall = "/usr/bin/rpm -qp $packagename |";
739 ($returnarray, $error) = make_systemcall_allowing_error($systemcall, 0, 0);
740 if ( $error ) { installer::exiter::exit_program("ERROR: rpm failed to query package!", "get_fullpkgname_value"); }
741 }
742 $value = ${$returnarray}[0];
743 installer::remover::remove_leading_and_ending_whitespaces(\$value);
744
745 my $rpmname = $packagename;

--- 113 unchanged lines hidden (view full) ---

859#######################################################
860
861sub make_systemcall
862{
863 my ( $systemcall, $logreturn ) = @_;
864
865 my @returns = ();
866
738 my $systemcall = "/usr/bin/rpm -qp $packagename |";
739 ($returnarray, $error) = make_systemcall_allowing_error($systemcall, 0, 0);
740 if ( $error ) { installer::exiter::exit_program("ERROR: rpm failed to query package!", "get_fullpkgname_value"); }
741 }
742 $value = ${$returnarray}[0];
743 installer::remover::remove_leading_and_ending_whitespaces(\$value);
744
745 my $rpmname = $packagename;

--- 113 unchanged lines hidden (view full) ---

859#######################################################
860
861sub make_systemcall
862{
863 my ( $systemcall, $logreturn ) = @_;
864
865 my @returns = ();
866
867 installer::logger::print_message( "... $systemcall ...\n" );
867 $installer::logger::Info->printf("... %s ...\n", $systemcall);
868
869 open (REG, "$systemcall");
870 while (<REG>) {push(@returns, $_); }
871 close (REG);
872
873 my $returnvalue = $?; # $? contains the return value of the systemcall
874
875 my $infoline = "Systemcall: $systemcall\n";

--- 27 unchanged lines hidden (view full) ---

903#######################################################
904
905sub make_systemcall_allowing_error
906{
907 my ( $systemcall, $logreturn, $can_fail ) = @_;
908
909 my @returns = ();
910
868
869 open (REG, "$systemcall");
870 while (<REG>) {push(@returns, $_); }
871 close (REG);
872
873 my $returnvalue = $?; # $? contains the return value of the systemcall
874
875 my $infoline = "Systemcall: $systemcall\n";

--- 27 unchanged lines hidden (view full) ---

903#######################################################
904
905sub make_systemcall_allowing_error
906{
907 my ( $systemcall, $logreturn, $can_fail ) = @_;
908
909 my @returns = ();
910
911 installer::logger::print_message( "... $systemcall ...\n" );
911 $installer::logger::Info->printf("... %s ...\n", $systemcall);
912
913 open (REG, "$systemcall");
914 while (<REG>) {push(@returns, $_); }
915 close (REG);
916
917 my $returnvalue = $?; # $? contains the return value of the systemcall
918
919 my $infoline = "Systemcall: $systemcall\n";

--- 915 unchanged lines hidden ---
912
913 open (REG, "$systemcall");
914 while (<REG>) {push(@returns, $_); }
915 close (REG);
916
917 my $returnvalue = $?; # $? contains the return value of the systemcall
918
919 my $infoline = "Systemcall: $systemcall\n";

--- 915 unchanged lines hidden ---