diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-04-15 05:41:41 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-04-15 05:41:41 +0000 |
commit | e64d103b85072a5820cbbe9bcc9961d4409ffefd (patch) | |
tree | efe834c1cb747a174054b3f85e12b8d3a38865fa | |
parent | 9e05290c907188c4d1bdf21ca08dd8befe7b8307 (diff) | |
download | perl-URPM-e64d103b85072a5820cbbe9bcc9961d4409ffefd.tar perl-URPM-e64d103b85072a5820cbbe9bcc9961d4409ffefd.tar.gz perl-URPM-e64d103b85072a5820cbbe9bcc9961d4409ffefd.tar.bz2 perl-URPM-e64d103b85072a5820cbbe9bcc9961d4409ffefd.tar.xz perl-URPM-e64d103b85072a5820cbbe9bcc9961d4409ffefd.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
(backported from trunk)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | URPM/Resolve.pm | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -1,3 +1,5 @@ +- add basic support for --downgrade (mga#6655) + Version 3.40.2 - 13 August 2012 - do not try to parse current pointer when the line is invalid or diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index e0eaf9d..3b16612 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -984,7 +984,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; } } @@ -1183,9 +1183,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 |