aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--URPM/Resolve.pm8
2 files changed, 6 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 287d674..93082bc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- add basic support for --downgrade (mga#6655)
+
Version 4.25 - 5 February 2013
- fix retrieving payload format
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