diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-02-09 21:25:01 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-02-09 21:25:01 +0000 |
commit | 61f2f2b0e753c456768ef0babe397fba794eeb41 (patch) | |
tree | bd9519f72ed849c4c3e6ca037fe12c39e6a7fc0e /URPM | |
parent | 536c050a6d1d80f4eb586d06514cb75890f18f70 (diff) | |
download | perl-URPM-61f2f2b0e753c456768ef0babe397fba794eeb41.tar perl-URPM-61f2f2b0e753c456768ef0babe397fba794eeb41.tar.gz perl-URPM-61f2f2b0e753c456768ef0babe397fba794eeb41.tar.bz2 perl-URPM-61f2f2b0e753c456768ef0babe397fba794eeb41.tar.xz perl-URPM-61f2f2b0e753c456768ef0babe397fba794eeb41.zip |
add basic support for --downgrade (mga#6655)
enabling eg to switching back to packages from core/release after
having installed some from core/updates_testing, then disabling it
Diffstat (limited to 'URPM')
-rw-r--r-- | URPM/Resolve.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 495d8e5..46793ff 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -983,7 +983,7 @@ sub resolve_requested__no_suggests_ { } else { _set_flag_installed_and_upgrade_if_no_newer($db, $pkg); - if ($pkg->flag_installed && !$pkg->flag_upgrade) { + if ($pkg->flag_installed && !$pkg->flag_upgrade && !$urpm->{options}{downgrade}) { _no_more_recent_installed_and_providing($urpm, $db, $state, $pkg, $dep->{required}) or next; } } @@ -1188,9 +1188,9 @@ sub _unselect_package_deprecated_by_property { if ($o && $comparison > 0) { #- installed package is newer #- remove this package from the list of packages to install, - #- unless urpmi was invoked with --allow-force (in which - #- case rpm could be invoked with --oldpackage) - if (!$urpm->{options}{'allow-force'}) { + #- unless urpmi was invoked with --allow-force + #- (in which case rpm could be invoked with --oldpackage) + if (!$urpm->{options}{'allow-force'} && !$urpm->{options}{downgrade}) { #- since the originally requested packages (or other #- non-installed ones) could be unselected by the following #- operation, remember them, to warn the user |