diff options
author | Sebastian | 2010-04-07 19:07:20 +0200 |
---|---|---|
committer | Sebastian | 2010-04-07 19:07:20 +0200 |
commit | 4c061fa1f75d93a56cfe39fe06354ad702304f22 (patch) | |
tree | e784f193716ca9be8fe1db36721d662344055e79 /lib/OpenSLX/Syscall.pm | |
parent | changed name of init-hook, qemukvm tun/tap config (diff) | |
download | core-4c061fa1f75d93a56cfe39fe06354ad702304f22.tar.gz core-4c061fa1f75d93a56cfe39fe06354ad702304f22.tar.xz core-4c061fa1f75d93a56cfe39fe06354ad702304f22.zip |
h2ph was executed on every loadperlheader call making demuxer really slow..
Diffstat (limited to 'lib/OpenSLX/Syscall.pm')
-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)', $!); } |