From 81485eced5a4b7929f736086bc88096550adf272 Mon Sep 17 00:00:00 2001 From: nott Date: Mon, 3 Aug 2009 13:07:29 +0000 Subject: [PATCH] Temporary fix for perl INC path issue. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3927 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/MsgUtils.pm | 9 +++++++++ perl-xCAT/xCAT/Table.pm | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/perl-xCAT/xCAT/MsgUtils.pm b/perl-xCAT/xCAT/MsgUtils.pm index 5c4410a3b..8d7e5ebc0 100644 --- a/perl-xCAT/xCAT/MsgUtils.pm +++ b/perl-xCAT/xCAT/MsgUtils.pm @@ -3,6 +3,15 @@ package xCAT::MsgUtils; +# if AIX - make sure we include perl 5.8.2 in INC path. +# Needed to find perl dependencies shipped in deps tarball. +if ($^O =~ /^aix/i) { + use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi"; + use lib "/usr/opt/perl5/lib/5.8.2"; + use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi"; + use lib "/usr/opt/perl5/lib/site_perl/5.8.2"; +} + use strict; use Sys::Syslog qw (:DEFAULT setlogsock); diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 35b58374c..9ed393cc3 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -13,6 +13,16 @@ BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; } + +# if AIX - make sure we include perl 5.8.2 in INC path. +# Needed to find perl dependencies shipped in deps tarball. +if ($^O =~ /^aix/i) { + use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi"; + use lib "/usr/opt/perl5/lib/5.8.2"; + use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi"; + use lib "/usr/opt/perl5/lib/site_perl/5.8.2"; +} + use lib "$::XCATROOT/lib/perl"; my $cachethreshold=16; #How many nodes in 'getNodesAttribs' before switching to full DB retrieval