diff options
author | Francois Pons <fpons@mandriva.com> | 2002-08-13 10:05:35 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-08-13 10:05:35 +0000 |
commit | be7994d2fd461c3594afb4bad5e0ef7276594a3b (patch) | |
tree | f07a1c8b409f5e26c6d1369b10422e84f923065a /URPM/Resolve.pm | |
parent | 692b5dd63adcdbef64aef9e8b2812c3704335bb2 (diff) | |
download | perl-URPM-be7994d2fd461c3594afb4bad5e0ef7276594a3b.tar perl-URPM-be7994d2fd461c3594afb4bad5e0ef7276594a3b.tar.gz perl-URPM-be7994d2fd461c3594afb4bad5e0ef7276594a3b.tar.bz2 perl-URPM-be7994d2fd461c3594afb4bad5e0ef7276594a3b.tar.xz perl-URPM-be7994d2fd461c3594afb4bad5e0ef7276594a3b.zip |
0.60-8mdk
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r-- | URPM/Resolve.pm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 8247489..4bafa2a 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -571,7 +571,8 @@ sub request_packages_to_upgrade { if (my ($pn, $pevr) = /^([^\s\[]*)(?:\[\*\])?\[?=+\s*([^\s\]]*)/) { $pn eq $n or next; if (ranges_overlap("< $evr", "== $pevr")) { - $skip{$provides{$n}->name} = undef; #- this package looks like too old ? + #- this package looks like too old ? + $provides{$n}->name ne $pkg->name and $skip{$provides{$n}->name} = undef; $provides{$n} = $pkg; } last; @@ -621,11 +622,15 @@ sub request_packages_to_upgrade { if (my $pkg = $names{$p->name}) { unless ($pkg->flag_upgrade || $pkg->flag_installed) { $pkg->set_flag_installed; #- there is at least one package installed (whatever its version). - $pkg->flag_upgrade and $pkg->set_flag_upgrade($pkg->compare_pkg($p) > 0); + $pkg->set_flag_upgrade; } - $pkg->flag_upgrade or delete $names{$p->name}; + $pkg->flag_upgrade and $pkg->set_flag_upgrade($pkg->compare_pkg($p) > 0); #- keep in mind the package is requested. - $pkg->flag_upgrade and $requested{$p->name} = undef; + if ($pkg->flag_upgrade) { + $requested{$p->name} = undef; + } else { + delete $names{$p->name}; + } } #- check provides of existing package to see if a obsolete @@ -663,7 +668,11 @@ sub request_packages_to_upgrade { $pkg->flag_upgrade and $pkg->set_flag_upgrade($pkg->compare_pkg($p) > 0); }); } - $pkg->flag_installed && !$pkg->flag_upgrade and delete $names{$pkg->name}; + if ($pkg->flag_installed && !$pkg->flag_upgrade) { + delete $names{$pkg->name}; + } else { + $requested{$pkg->name} = undef; + } } #- examine all packages which may be conflicting, it a package conflicts, it should not be requested. |