diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/args.pm | 1 | ||||
-rw-r--r-- | urpm/install.pm | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/urpm/args.pm b/urpm/args.pm index 7207a069..26c07f0b 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -99,6 +99,7 @@ my %options_spec = ( $options{buildrequires} = 1 }, 'buildrequires' => \$options{buildrequires}, 'install-src' => \$::install_src, + reinstall => sub { $urpm->{options}{reinstall} = 1 }, clean => sub { $::clean = 1; $::noclean = 0 }, noclean => sub { $::clean = $urpm->{options}{'pre-clean'} = $urpm->{options}{'post-clean'} = 0; diff --git a/urpm/install.pm b/urpm/install.pm index 68f75a2c..e0d22441 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -230,7 +230,8 @@ sub _schedule_packages { ($true_rpm, $true_pkg) = _apply_delta_rpm($urpm, $mode->{$_}, $mode, $pkg); push @produced_deltas, ($mode->{$_} = $true_rpm); #- fix path } - if ($trans->add($true_pkg || $pkg, update => $update, + if ($urpm->{options}{reinstall} ? $trans->addReinstall($true_pkg || $pkg) : + $trans->add($true_pkg || $pkg, update => $update, $options{excludepath} ? (excludepath => [ split /,/, $options{excludepath} ]) : ())) { $urpm->{debug} and $urpm->{debug}( sprintf('trans: scheduling %s of %s (id=%d, file=%s)', |