X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git;a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=3b37451d4bff10f5a1ab3eb40ed22cfa6453ef45;hp=26703a4cce0d14718d4f1d972fd410c8dc75734c;hb=99578d57a0086c534f0808f3bfc30849fb0511f4;hpb=f722064b6599dbed7fe5a6f4a3a7a935dd3f16c0 diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 26703a4..3b37451 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -279,8 +279,14 @@ sub uninstall { sub _run { my ($self, $cmd, $verbose) = @_; + my $stat = $self->status; + + my ($success, $errmsg, $output) = do { + local $ENV{PORTDIR_OVERLAY} = $stat->overlay; + local $ENV{PORTAGE_RO_DISTDIRS} = $stat->distdir; + run command => $cmd, verbose => $verbose; + }; - my ($success, $errmsg, $output) = run command => $cmd, verbose => $verbose; unless ($success) { error "$errmsg -- aborting"; if (not $verbose and defined $output and $self->status->verbose) {