From 29d2468498dcfc45b1f4637e4c9919990af7e6a1 Mon Sep 17 00:00:00 2001 From: freesource Date: Mon, 24 Feb 2003 17:50:35 +0000 Subject: [PATCH] Hopefully, this solves another @INC bug. --- expect_uml | 4 +++- gbootroot | 3 ++- yard_chrooted_tests | 18 +++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/expect_uml b/expect_uml index 280623c..7f48555 100755 --- a/expect_uml +++ b/expect_uml @@ -28,9 +28,11 @@ BEGIN { my $fhs = grep(/\/usr\/share\/perl5/,@INC); + + unshift(@INC,"."); # better make sure we mean . when we mean . + if ($fhs == 0) { unshift(@INC,"/usr/share/perl5"); - unshift(@INC,"."); # better make sure we mean . when we mean . } diff --git a/gbootroot b/gbootroot index 62c8758..1a11e63 100755 --- a/gbootroot +++ b/gbootroot @@ -220,9 +220,10 @@ BEGIN { my $fhs = grep(/\/usr\/share\/perl5/,@INC); + unshift(@INC,"."); # better make sure we mean . when we mean . + if ($fhs == 0) { unshift(@INC,"/usr/share/perl5"); - unshift(@INC,"."); # better make sure we mean . when we mean . } diff --git a/yard_chrooted_tests b/yard_chrooted_tests index 74b3699..5b47d13 100755 --- a/yard_chrooted_tests +++ b/yard_chrooted_tests @@ -30,10 +30,14 @@ ## ############################################################################## + + BEGIN { my $fhs = grep(/\/usr\/share\/perl5/,@INC); + unshift(@INC,"."); # better make sure we mean . when we mean . + if ($fhs == 0) { unshift(@INC,"/usr/share/perl5"); } @@ -49,8 +53,20 @@ BEGIN { $ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; } -} + my $pwd = `pwd`; chomp $pwd; + + my $tools = grep(/$pwd\/user-mode-linux\/usr\/bin/,$ENV{'PATH'}); + if ($tools == 0) { + $ENV{'PATH'} = "$pwd/user-mode-linux/usr/bin:" . $ENV{'PATH'}; + } + + $tools = grep(/$pwd\/user-mode-linux\/usr\/lib\/uml/,$ENV{'PATH'}); + if ($tools == 0) { + $ENV{'PATH'} = "$pwd/user-mode-linux/usr/lib\/uml:" . $ENV{'PATH'}; + } + +} use strict; use BootRoot::Yard;