From db8560f411bff2c71820fbfa0319acd4fd0f8337 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 6 May 2007 18:18:20 +0000 Subject: * switched strange behaviour: instead of forcing absolute paths to be relative to given root, we know force relative paths to be relative from that root. This allows slxldd to work against binaries that live outside of that root, too. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1015 95ad53e4-c205-0410-b2fa-d234c58c8868 --- bin/slxldd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/slxldd b/bin/slxldd index 38b9508f..88ac7574 100755 --- a/bin/slxldd +++ b/bin/slxldd @@ -83,9 +83,9 @@ if (!@ARGV) { fetchLoaderConfig(); foreach my $file (@ARGV) { - if ($file =~ m[^/]) { - # force absolute path relative to $rootPath: - $file = "$rootPath$file"; + if (substr($file,0,1) ne '/') { + # force relative paths relative to $rootPath: + $file = "$rootPath/$file"; } if (!-e $file) { print STDERR _tr("slxldd: unable to find file '%s', skipping it\n", $file); @@ -135,12 +135,12 @@ sub fetchLoaderConfig push @libFolders, "$rootPath/usr/lib"; } - # add lib32-folders for 64-bit Debians, as they do not + # add lib32-folders for 64-bit Debians, as they do not # refer those in ld.so.conf (which I find strange...) if (-e '/lib32' && !grep { m[^$rootPath/lib32$]} @libFolders) { push @libFolders, "$rootPath/lib32"; } - if (-e '/usr/lib32' + if (-e '/usr/lib32' && !grep { m[^$rootPath/usr/lib32$] } @libFolders) { push @libFolders, "$rootPath/usr/lib32"; } -- cgit v1.2.3-55-g7522