summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-12 15:45:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-12 15:45:31 +0000
commit9b9000d41c7794a92438b23fb8b99d3fa844c48b (patch)
tree1669c4bafb37305acee6b00c20d7a37a8125892d
parente2dc16e7a2430c552e2e181cab8c44de8c5a831d (diff)
downloadurpmi-9b9000d41c7794a92438b23fb8b99d3fa844c48b.tar
urpmi-9b9000d41c7794a92438b23fb8b99d3fa844c48b.tar.gz
urpmi-9b9000d41c7794a92438b23fb8b99d3fa844c48b.tar.bz2
urpmi-9b9000d41c7794a92438b23fb8b99d3fa844c48b.tar.xz
urpmi-9b9000d41c7794a92438b23fb8b99d3fa844c48b.zip
do display computed transaction with --debug__do_not_install even if --debug
is not used
-rw-r--r--urpm/install.pm3
-rw-r--r--urpm/main_loop.pm7
2 files changed, 7 insertions, 3 deletions
diff --git a/urpm/install.pm b/urpm/install.pm
index c656c9ed..29bf272f 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -53,9 +53,6 @@ sub build_transaction_set_ {
#- build transaction set...
$urpm->build_transaction_set($db, $state, split_length => $options{split_length});
}
-
- $urpm->{debug} and $urpm->{debug}(join("\n", "scheduled sets of transactions:",
- transaction_set_to_string($urpm, $state->{transaction} || [])));
}
sub transaction_set_to_string {
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index b3eb5e0d..c99ce474 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -65,6 +65,13 @@ urpm::install::build_transaction_set_($urpm, $state,
split_level => $urpm->{options}{'split-level'},
split_length => !$test && $urpm->{options}{'split-length'});
+ if ($options{debug__do_not_install}) {
+ $urpm->{debug} = sub { print STDERR "$_[0]\n" };
+ }
+
+$urpm->{debug} and $urpm->{debug}(join("\n", "scheduled sets of transactions:",
+ urpm::install::transaction_set_to_string($urpm, $state->{transaction} || [])));
+
$options{debug__do_not_install} and exit 0;
my ($ok, $nok) = (0, 0);