diff options
author | Olivier Rosello <orosello@mandriva.com> | 2009-08-06 15:33:32 +0000 |
---|---|---|
committer | Olivier Rosello <orosello@mandriva.com> | 2009-08-06 15:33:32 +0000 |
commit | 5917565e3903fa2161adca72bb2c30d840caad48 (patch) | |
tree | a0203ac0fc655b2791e22a8ac8b66b9af5230ca4 /urpm/dudf.pm | |
parent | a7673be2379e04a4ed22e8760e82323eacd57c07 (diff) | |
download | urpmi-5917565e3903fa2161adca72bb2c30d840caad48.tar urpmi-5917565e3903fa2161adca72bb2c30d840caad48.tar.gz urpmi-5917565e3903fa2161adca72bb2c30d840caad48.tar.bz2 urpmi-5917565e3903fa2161adca72bb2c30d840caad48.tar.xz urpmi-5917565e3903fa2161adca72bb2c30d840caad48.zip |
fixes part of bug #52655 : if urpm-dudf installed and --auto used : no more question, no dudf upload
Diffstat (limited to 'urpm/dudf.pm')
-rw-r--r-- | urpm/dudf.pm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/urpm/dudf.pm b/urpm/dudf.pm index 753e82dd..ec597617 100644 --- a/urpm/dudf.pm +++ b/urpm/dudf.pm @@ -330,7 +330,11 @@ sub compute_pkgs_user { if (@{$self->{pkgs_toinstall}}) { foreach my $pkg (@{$self->{pkgs_toinstall}}) { if ($p eq $pk->name) { - if ($pkg->name ne $pk->name || $pkg->version ne $pk->version || $pkg->arch ne $pk->arch || $pkg->release ne $pk->release || $pkg->epoch ne $pk->epoch) { + if (($pkg->name ne $pk->name || + $pkg->version ne $pk->version || + $pkg->arch ne $pk->arch || + $pkg->release ne $pk->release || + $pkg->epoch ne $pk->epoch)) { $in = 1; if (!grep($p, @{$self->{pkgs_user_upgrade}})) { push(@{$self->{pkgs_user_upgrade}}, $p); @@ -350,7 +354,7 @@ sub compute_pkgs_user { sub write_dudf { my ($self) = @_; - if ($self->{force_dudf} != 0 || $self->{exit_code} != 0) { + if ($self->{force_dudf} != 0 || ($self->{exit_code} != 0 && ${$self->{dudf_urpm}}->{options}{auto} != 1)) { my $noexpr = N("Nn"); my $msg = N("A problem has been encountered. You can help Mandriva to improve package\ninstallation by uploading a DUDF report file.\nThis is a part of the Mancoosi european research project.\nMore at http://www.mancoosi.org\n"); $msg .= N("Do you want to upload to Mandriva a DUDF report?"); @@ -419,7 +423,11 @@ sub write_dudf { # packages installed by urpmi are removed from the list if (@{$self->{pkgs_toinstall}}) { foreach my $pkg (@{$self->{pkgs_toinstall}}) { - if ($pkg->name ne $pk->name || $pkg->version ne $pk->version || $pkg->arch ne $pk->arch || $pkg->release ne $pk->release || $pkg->epoch ne $pk->epoch) { + if (($pkg->name ne $pk->name || + $pkg->version ne $pk->version || + $pkg->arch ne $pk->arch || + $pkg->release ne $pk->release || + $pkg->epoch ne $pk->epoch)) { xml_pkgs($doc,$pk); } } |