diff options
author | Michael Janczyk | 2010-04-08 21:12:48 +0200 |
---|---|---|
committer | Michael Janczyk | 2010-04-08 21:12:48 +0200 |
commit | f90fba1b1427d94ccab2dafa5f4e9469575aba85 (patch) | |
tree | 135088d84775a31b9d13f22b121ca69b545fc7dc | |
parent | annoying warning from demuxer removed, has to be solved otherwise (diff) | |
parent | h2ph was executed on every loadperlheader call making demuxer really slow.. (diff) | |
download | core-f90fba1b1427d94ccab2dafa5f4e9469575aba85.tar.gz core-f90fba1b1427d94ccab2dafa5f4e9469575aba85.tar.xz core-f90fba1b1427d94ccab2dafa5f4e9469575aba85.zip |
Merge branch 'master' of git@openslx.org:openslx/core
-rw-r--r-- | lib/OpenSLX/Syscall.pm | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lib/OpenSLX/Syscall.pm b/lib/OpenSLX/Syscall.pm index 172db4d0..da72ae3d 100644 --- a/lib/OpenSLX/Syscall.pm +++ b/lib/OpenSLX/Syscall.pm @@ -73,23 +73,25 @@ sub _loadPerlHeader # any of these). # If they are missing, we just have a go at creating all of them: mkpath($phLibDir) unless -e $phLibDir; - if (-l "/usr/include/asm" && !-e "$phLibDir/asm") { - my $asmFolder = readlink("/usr/include/asm"); - slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir $asmFolder") == 0 - or die _tr('unable to create Perl-header from "asm" folder! (%s)', $!); - slxsystem("mv $phLibDir/$asmFolder $phLibDir/asm") == 0 - or die _tr('unable to cleanup "asm" folder for Perl headers! (%s)', $!); - } - elsif (-d "/usr/include/asm") { - slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir asm") == 0 - or die _tr('unable to create Perl-header from "asm" folder! (%s)', $!); - } - else { - die _tr( - 'the folder "/usr/include/asm" is required - please install kernel headers!' - ); + if (!-e "$phLibDir/asm") { + if (-l "/usr/include/asm") { + my $asmFolder = readlink("/usr/include/asm"); + slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir $asmFolder") == 0 + or die _tr('unable to create Perl-header from "asm" folder! (%s)', $!); + slxsystem("mv $phLibDir/$asmFolder $phLibDir/asm") == 0 + or die _tr('unable to cleanup "asm" folder for Perl headers! (%s)', $!); + } + elsif (-d "/usr/include/asm") { + slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir asm") == 0 + or die _tr('unable to create Perl-header from "asm" folder! (%s)', $!); + } + else { + die _tr( + 'the folder "/usr/include/asm" is required - please install kernel headers!' + ); + } } - if (-e "usr/include/asm-generic" && !-e "$phLibDir/asm-generic") { + if (-e "/usr/include/asm-generic" && !-e "$phLibDir/asm-generic") { slxsystem("cd /usr/include && h2ph -rQ -d $phLibDir asm-generic") == 0 or die _tr('unable to create Perl-header from "asm-generic" folder! (%s)', $!); } |