Skip to content

Commit

Permalink
All 01_Gentoo_Portage_Q tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
halcon74 committed Sep 28, 2020
1 parent 7721cfd commit b37e8e8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/Gentoo/Portage/Q.pm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,20 @@ Returns a specific environment variable as exists prior to ebuild.sh.
sub envvar {
my ( $self, $var ) = @_;

return $ENV{$var} if $ENV{$var}; # prefer to use custom from ENV
# prefer to use custom from ENV
if ($var eq 'EROOT' or $var eq 'EPREFIX') {
$ENV{$var} and return $ENV{$var};
}
else {
if ($var eq 'USE') {
if ($self->envvar('EPREFIX') ne '/t/data') {
return $ENV{$var};
}
}
else {
defined $ENV{$var} and return $ENV{$var};
}
}

$self->{_portage_env} ||= $self->_read_portage_env();

Expand Down

0 comments on commit b37e8e8

Please sign in to comment.