summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOliver Tappe2007-02-23 18:03:30 +0100
committerOliver Tappe2007-02-23 18:03:30 +0100
commit3e271c1ecf79fed1c68b63c7ca0ae0f478e2b091 (patch)
tree08a329b1c4c39a82ea6fd2235952d1e92a5dc5a5 /bin
parentDo not preload agpgart kernel module (should be handled automatically) (diff)
downloadcore-3e271c1ecf79fed1c68b63c7ca0ae0f478e2b091.tar.gz
core-3e271c1ecf79fed1c68b63c7ca0ae0f478e2b091.tar.xz
core-3e271c1ecf79fed1c68b63c7ca0ae0f478e2b091.zip
* fixed bug that caused the architecture detection to fail an 64-bit
systems git-svn-id: http://svn.openslx.org/svn/openslx/trunk@714 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'bin')
-rwxr-xr-xbin/slxldd14
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/slxldd b/bin/slxldd
index 0a3fcb1d..7c578b5d 100755
--- a/bin/slxldd
+++ b/bin/slxldd
@@ -146,7 +146,7 @@ sub addLib
foreach my $folder (@folders) {
if (-e "$folder/$lib") {
# have library matching name, now check if the platform is ok, too:
- my $libFileInfo = `file --dereference $folder/$lib 2>/dev/null`;
+ my $libFileInfo = `file --dereference --brief $folder/$lib 2>/dev/null`;
if ($?) {
die _tr("unable to fetch file info for '%s', giving up!\n",
$folder/$lib);
@@ -177,17 +177,25 @@ sub addLibsForBinary
# first do some checks:
print STDERR _tr("analyzing '%s'...\n", $binary) if $verbose;
my $fileInfo = `file --dereference --brief --mime $binary 2>/dev/null`;
- chomp $fileInfo;
- print STDERR _tr("\tinfo is: '%s'...\n", $fileInfo) if $verbose;
if ($?) {
die _tr("unable to fetch file info for $binary, giving up!\n");
}
+ chomp $fileInfo;
+ print STDERR _tr("\tinfo is: '%s'...\n", $fileInfo) if $verbose;
if ($fileInfo !~ m[^application/(x-executable|x-shared)]i) {
# ignore anything that's not an executable or a shared library
print STDERR _tr("%s: ignored, as it isn't an executable or a shared library\n", $binary);
next;
}
+ # fetch file info again, this time without '--mime' in order to get the architecture
+ # bitwidth:
+ $fileInfo = `file --dereference --brief $binary 2>/dev/null`;
+ if ($?) {
+ die _tr("unable to fetch file info for $binary, giving up!\n");
+ }
+ chomp $fileInfo;
+ print STDERR _tr("\tinfo is: '%s'...\n", $fileInfo) if $verbose;
my $bitwidth = ($fileInfo =~ m[64-bit]i) ? 64 : 32;
# determine whether binary is 32- or 64-bit platform