From ac308166200bbda2ecdf63f4724b7e6319cd1465 Mon Sep 17 00:00:00 2001 From: nott Date: Wed, 8 Aug 2012 17:27:50 +0000 Subject: [PATCH] fix perl INC path git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13450 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 5 +---- perl-xCAT/xCAT/FSPUtils.pm | 5 +---- perl-xCAT/xCAT/InstUtils.pm | 8 ++------ perl-xCAT/xCAT/MsgUtils.pm | 8 ++------ perl-xCAT/xCAT/NetworkUtils.pm | 5 +---- perl-xCAT/xCAT/Table.pm | 5 +---- perl-xCAT/xCAT/Utils.pm | 5 +---- perl-xCAT/xCAT/Version.pm | 5 +---- 8 files changed, 10 insertions(+), 36 deletions(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index c98241e03..2a2cbaef8 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -9,10 +9,7 @@ BEGIN # 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"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } my $inet6support; diff --git a/perl-xCAT/xCAT/FSPUtils.pm b/perl-xCAT/xCAT/FSPUtils.pm index 4ef9ea454..db4704812 100644 --- a/perl-xCAT/xCAT/FSPUtils.pm +++ b/perl-xCAT/xCAT/FSPUtils.pm @@ -10,10 +10,7 @@ BEGIN # 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"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl"; diff --git a/perl-xCAT/xCAT/InstUtils.pm b/perl-xCAT/xCAT/InstUtils.pm index 300d13536..018bfe6d8 100644 --- a/perl-xCAT/xCAT/InstUtils.pm +++ b/perl-xCAT/xCAT/InstUtils.pm @@ -9,12 +9,8 @@ BEGIN # 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"; +if ($^O =~ /^aix/i) { + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl"; diff --git a/perl-xCAT/xCAT/MsgUtils.pm b/perl-xCAT/xCAT/MsgUtils.pm index 987de91aa..b612799ce 100644 --- a/perl-xCAT/xCAT/MsgUtils.pm +++ b/perl-xCAT/xCAT/MsgUtils.pm @@ -5,12 +5,8 @@ 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"; +if ($^O =~ /^aix/i) { + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use strict; diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 405f6efbe..cd4e0822d 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -10,10 +10,7 @@ BEGIN # 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"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl"; diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index ba51b3c35..c8b22718d 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -51,10 +51,7 @@ BEGIN # 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"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl"; diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index f3e0fbe85..0fa8d9ca6 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -10,10 +10,7 @@ BEGIN # 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"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl"; diff --git a/perl-xCAT/xCAT/Version.pm b/perl-xCAT/xCAT/Version.pm index e492a384f..787f4139c 100644 --- a/perl-xCAT/xCAT/Version.pm +++ b/perl-xCAT/xCAT/Version.pm @@ -10,10 +10,7 @@ BEGIN # 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"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl";