]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/blobdiff - lib/CPANPLUS/Dist/Gentoo.pm
Store the force flag into the status
[perl/modules/CPANPLUS-Dist-Gentoo.git] / lib / CPANPLUS / Dist / Gentoo.pm
index 26703a4cce0d14718d4f1d972fd410c8dc75734c..786308b02d85cf37556fd557066db91377d01aac 100644 (file)
@@ -70,8 +70,9 @@ sub init {
  $stat->mk_accessors(qw/name version dist desc uri src license deps
                         eb_name eb_version eb_dir eb_file fetched_arch
                         overlay distdir keywords do_manifest
-                        verbose/);
+                        force verbose/);
 
+ $stat->force($conf->get_conf('force'));
  $stat->verbose($conf->get_conf('verbose'));
 
  return 1;
@@ -279,8 +280,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) {