aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-02 13:21:42 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-02 13:21:42 +0000
commit2eb7ace806359305285be04337e7f2f35eaefc38 (patch)
tree17e35c4aa4e46c42228f23d5f91e00f1c8dc51d3
parent5b81c38f905dfb1a518082f2abd287460b11cb33 (diff)
downloadrpmdrake-2eb7ace806359305285be04337e7f2f35eaefc38.tar
rpmdrake-2eb7ace806359305285be04337e7f2f35eaefc38.tar.gz
rpmdrake-2eb7ace806359305285be04337e7f2f35eaefc38.tar.bz2
rpmdrake-2eb7ace806359305285be04337e7f2f35eaefc38.tar.xz
rpmdrake-2eb7ace806359305285be04337e7f2f35eaefc38.zip
handle allow-force
-rwxr-xr-xRpmdrake/pkg.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 259c57bf..766aa26b 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -659,6 +659,33 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
nodeps => 1,
%install_options_common,
);
+ if (@l) {
+ if (!$urpm->{options}{'allow-force'}) {
+ ++$nok;
+ ++$urpm->{logger_id};
+ push @errors, @l;
+ } else {
+ interactive_msg(N("Error"),
+ N("Installation failed:") . "\n" . join("\n", map { "\t$_" } @l) . "\n\n" .
+ N("Try harder to install (--force)? (y/N) "),
+ yesno => 1
+ ) or ++$nok, next;
+ $urpm->{log}("starting force installing packages without deps");
+ @l = urpm::install::install($urpm,
+ $to_remove,
+ \%transaction_sources_install, \%transaction_sources,
+ nodeps => 1, force => 1,
+ %install_options_common,
+ );
+ if (@l) {
+ #- Warning : the following message is parsed in urpm::parallel_*
+ print N("Installation failed") . ":\n" . join("\n", map { "\t$_" } @l), "\n";
+ ++$nok;
+ ++$urpm->{logger_id};
+ push @errors, @l;
+ }
+ }
+ }
}
}
}