From 80afaee2da19af86e884292b6501bf98d23cbd56 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sat, 3 Feb 2007 16:45:00 +0000 Subject: * fixed problems with regards to extractTranslations.pl git-svn-id: http://svn.openslx.org/svn/openslx/trunk@675 95ad53e4-c205-0410-b2fa-d234c58c8868 --- bin/slxldd | 16 ++++++++++++---- config-db/OpenSLX/ConfigDB.pm | 7 +++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/bin/slxldd b/bin/slxldd index edc283a7..fb16c9b6 100755 --- a/bin/slxldd +++ b/bin/slxldd @@ -191,21 +191,27 @@ sub addLibsForBinary # determine whether binary is 32- or 64-bit platform # now find out about needed libs, we first try objdump... - print STDERR _tr("\ttrying objdump...\n") if $verbose; + if ($verbose) { + print STDERR _tr("\ttrying objdump...\n"); + } my $res = `objdump -p $binary 2>/dev/null`; if (!$?) { # find out if rpath is set for binary: my $rpath; if ($res =~ m[^\s*RPATH\s*(\S+)]im) { $rpath = $1; - print STDERR _tr("\trpath='%s'\n", $rpath) if $verbose; + if ($verbose) { + print STDERR _tr("\trpath='%s'\n", $rpath); + } } while($res =~ m[^\s*NEEDED\s*(.+?)\s*$]gm) { addLib($1, $bitwidth, $rpath); } } else { # ...objdump failed, so we try readelf instead: - print STDERR _tr("\ttrying readelf...\n") if $verbose; + if ($verbose) { + print STDERR _tr("\ttrying readelf...\n"); + } $res = `readelf -d $binary 2>/dev/null`; if ($?) { die _tr("neither objdump nor readelf seems to be installed, giving up!\n"); @@ -214,7 +220,9 @@ sub addLibsForBinary my $rpath; if ($res =~ m/Library\s*rpath:\s*\[([^\]]+)/im) { $rpath = $1; - print STDERR _tr("\trpath='%s'\n", $rpath) if $verbose; + if ($verbose) { + print STDERR _tr("\trpath='%s'\n", $rpath); + } } while($res =~ m{\(NEEDED\)[^\[]+\[(.+?)\]\s*$}gm) { addLib($1, $bitwidth, $rpath); diff --git a/config-db/OpenSLX/ConfigDB.pm b/config-db/OpenSLX/ConfigDB.pm index 3323ed04..fce953b6 100644 --- a/config-db/OpenSLX/ConfigDB.pm +++ b/config-db/OpenSLX/ConfigDB.pm @@ -178,16 +178,15 @@ sub connectConfigDB my $dbModule = "OpenSLX::MetaDB::$dbType"; unless (eval "require $dbModule") { if ($! == 2) { - die _tr("Unable to load DB-module <%s>\n" - ."that database type is not supported (yet?)\n", $dbModule); + die _tr("Unable to load DB-module <%s>\nthat database type is not supported (yet?)\n", + $dbModule); } else { die _tr("Unable to load DB-module <%s> (%s)\n", $dbModule, $@); } } my $modVersion = $dbModule->VERSION; if ($modVersion < $VERSION) { - confess _tr('Could not load module <%s> (Version <%s> required, ' - .'but <%s> found)', + confess _tr('Could not load module <%s> (Version <%s> required, but <%s> found)', $dbModule, $VERSION, $modVersion); } $dbModule->import; -- cgit v1.2.3-55-g7522