Browse Source

Hopefully, this solves another @INC bug.

master
freesource 22 years ago
parent
commit
29d2468498
  1. 4
      expect_uml
  2. 3
      gbootroot
  3. 18
      yard_chrooted_tests

4
expect_uml

@ -28,9 +28,11 @@ BEGIN {
my $fhs = grep(/\/usr\/share\/perl5/,@INC); my $fhs = grep(/\/usr\/share\/perl5/,@INC);
unshift(@INC,"."); # better make sure we mean . when we mean .
if ($fhs == 0) { if ($fhs == 0) {
unshift(@INC,"/usr/share/perl5"); unshift(@INC,"/usr/share/perl5");
unshift(@INC,"."); # better make sure we mean . when we mean .
} }

3
gbootroot

@ -220,9 +220,10 @@ BEGIN {
my $fhs = grep(/\/usr\/share\/perl5/,@INC); my $fhs = grep(/\/usr\/share\/perl5/,@INC);
unshift(@INC,"."); # better make sure we mean . when we mean .
if ($fhs == 0) { if ($fhs == 0) {
unshift(@INC,"/usr/share/perl5"); unshift(@INC,"/usr/share/perl5");
unshift(@INC,"."); # better make sure we mean . when we mean .
} }

18
yard_chrooted_tests

@ -30,10 +30,14 @@
## ##
############################################################################## ##############################################################################
BEGIN { BEGIN {
my $fhs = grep(/\/usr\/share\/perl5/,@INC); my $fhs = grep(/\/usr\/share\/perl5/,@INC);
unshift(@INC,"."); # better make sure we mean . when we mean .
if ($fhs == 0) { if ($fhs == 0) {
unshift(@INC,"/usr/share/perl5"); unshift(@INC,"/usr/share/perl5");
} }
@ -49,8 +53,20 @@ BEGIN {
$ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'}; $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 strict;
use BootRoot::Yard; use BootRoot::Yard;

Loading…
Cancel
Save