Author: af
Date: Fri Nov 1 09:32:50 2013
New Revision: 1537864
URL: http://svn.apache.org/r1537864
Log:
123959: Fixed build breaker due to deprecation of print_message().
Modified:
openoffice/trunk/main/solenv/bin/modules/installer/languagepack.pm
openoffice/trunk/main/solenv/bin/modules/installer/logger.pm
openoffice/trunk/main/solenv/bin/modules/installer/xpdinstaller.pm
Modified: openoffice/trunk/main/solenv/bin/modules/installer/languagepack.pm
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/languagepack.pm?rev=1537864&r1=1537863&r2=1537864&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/languagepack.pm
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/languagepack.pm Fri Nov
1 09:32:50 2013
@@ -162,7 +162,7 @@ sub create_tar_gz_file
$packagename =~ s/\.rpm\s*$//;
my $targzname = $packagename . ".tar.gz";
$systemcall = "cd $installdir; tar -cf - $packagestring | gzip >
$targzname";
- installer::logger::print_message( "... $systemcall ...\n" );
+ $installer::logger::Info->printf("... %s ...\n", $systemcall);
my $returnvalue = system($systemcall);
@@ -499,7 +499,7 @@ sub build_installer_for_languagepack
{
my ($installdir, $allvariableshashref, $includepatharrayref,
$languagesarrayref, $languagestringref) = @_;
- installer::logger::print_message( "... creating shell script installer
...\n" );
+ $installer::logger::Info->print("... creating shell script installer
...\n");
installer::logger::include_header_into_logfile("Creating shell script
installer:");
Modified: openoffice/trunk/main/solenv/bin/modules/installer/logger.pm
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/logger.pm?rev=1537864&r1=1537863&r2=1537864&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/logger.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/logger.pm Fri Nov 1
09:32:50 2013
@@ -32,6 +32,20 @@ use strict;
my $StartTime = undef;
+sub Die ($)
+{
+ my ($message) = @_;
+ print "Stack Trace:\n";
+ my $i = 1;
+ while ((my @call_details = (caller($i++))))
+ {
+ printf("%s:%s in function %s\n", $call_details[1], $call_details[2],
$call_details[3]);
+ }
+
+ die $message;
+}
+
+
=head1 NAME
installer::logger
@@ -158,7 +172,7 @@ sub print ($$;$)
{
my ($self, $message, $force) = @_;
- die "newline at start of line" if ($message =~ /^\n.+/);
+ Die "newline at start of line" if ($message =~ /^\n.+/);
$force = 0 unless defined $force;
@@ -258,7 +272,7 @@ sub set_filename ($$)
if ($filename ne "")
{
open $self->{'file'}, ">", $self->{'filename'}
- || die "can not open log file ".$self->{'filename'}." for writing";
+ || Die "can not open log file ".$self->{'filename'}." for writing";
$self->{'is_print_to_console'} = 0;
# Make all writes synchronous so that we don't loose any messages
on an
@@ -386,7 +400,7 @@ sub include_header_into_globallogfile
sub include_timestamp_into_logfile
{
- die "deprected";
+ Die "deprected";
my ($message) = @_;
my $infoline;
@@ -591,8 +605,8 @@ sub set_installation_date
sub print_message
{
- die "print_message is deprecated";
-
+ Die "print_message is deprecated";
+
my $message = shift;
chomp $message;
my $force = shift || 0;
Modified: openoffice/trunk/main/solenv/bin/modules/installer/xpdinstaller.pm
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/xpdinstaller.pm?rev=1537864&r1=1537863&r2=1537864&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/xpdinstaller.pm
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/xpdinstaller.pm Fri Nov
1 09:32:50 2013
@@ -596,7 +596,7 @@ sub get_size_value
# Evaluating an error, because of rpm problems with removed
LD_LIBRARY_PATH
if ( $error )
{
- installer::logger::print_message( "... trying
/usr/bin/rpm ...\n" );
+ $installer::logger::Info->print("... trying /usr/bin/rpm ...\n");
my $systemcall = "/usr/bin/rpm -qp --queryformat
\"\[\%\{FILESIZES\}\\n\]\" $packagename 2\>\&1 |";
($rpmout, $error) =
make_systemcall_allowing_error($systemcall, 0, 0);
if ( $error ) { installer::exiter::exit_program("ERROR:
rpm failed to query package!", "get_size_value"); }
@@ -734,7 +734,7 @@ sub get_fullpkgname_value
# Evaluating an error, because of rpm problems with removed
LD_LIBRARY_PATH
if ( $error )
{
- installer::logger::print_message( "... trying
/usr/bin/rpm ...\n" );
+ $installer::logger::Info->print("... trying /usr/bin/rpm ...\n");
my $systemcall = "/usr/bin/rpm -qp $packagename |";
($returnarray, $error) =
make_systemcall_allowing_error($systemcall, 0, 0);
if ( $error ) { installer::exiter::exit_program("ERROR:
rpm failed to query package!", "get_fullpkgname_value"); }
@@ -864,7 +864,7 @@ sub make_systemcall
my @returns = ();
- installer::logger::print_message( "... $systemcall ...\n" );
+ $installer::logger::Info->printf("... %s ...\n", $systemcall);
open (REG, "$systemcall");
while (<REG>) {push(@returns, $_); }
@@ -908,7 +908,7 @@ sub make_systemcall_allowing_error
my @returns = ();
- installer::logger::print_message( "... $systemcall ...\n" );
+ $installer::logger::Info->printf("... %s ...\n", $systemcall);
open (REG, "$systemcall");
while (<REG>) {push(@returns, $_); }