summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm27
-rw-r--r--urpmi.spec6
2 files changed, 22 insertions, 11 deletions
diff --git a/urpm.pm b/urpm.pm
index 0048b9a6..3d7e46b1 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1033,11 +1033,16 @@ sub filter_minimal_packages_to_upgrade {
}
});
$ask_child->("$pkg->{name}-$pkg->{version}-$pkg->{release}", "provides", sub {
- /^(\S*\s*\S*\s*)(\d+:)?([^\s-]*)(-?\S*)/;
- foreach ($_, "$1$3", "$1$2$3", "$1$3$4") {
- delete $diffprovides{$_};
+ $_[0] =~ /^(\S*\s*\S*\s*)(\d+:)?([^\s-]*)(-?\S*)/;
+ foreach ($_[0], "$1$3", "$1$2$3", "$1$3$4") {
+ delete $diffprovides{$_[0]};
}
});
+ foreach ($pkg->{name}, "$pkg->{name} == $pkg->{version}", "$pkg->{name} == $pkg->{version}-$pkg->{release}") {
+ delete $diffprovides{$_};
+ }
+ delete $diffprovides{""};
+
foreach (keys %diffprovides) {
#- check for exact match on it.
if (/^(\S*)\s*(\S*)\s*(\d+:)?([^\s-]*)-?(\S*)/) {
@@ -1062,13 +1067,15 @@ sub filter_minimal_packages_to_upgrade {
#- if the provides is not found, it will be resolved at next step, else
#- it will be resolved by searching the rpm database.
$provides{$1} ||= undef;
- rpmtools::db_traverse_tag($db,
- 'whatprovides', [ $1 ],
- [ qw (name version release) ], sub {
- $3 and eval(rpmtools::version_compare($_[0]{version}, $3) . $2 . 0) || return;
- $4 and eval(rpmtools::version_compare($_[0]{release}, $4) . $2 . 0) || return;
- $provides{$1} = "$_[0]{name}-$_[0]{version}-$_[0]{release}";
- });
+ my $check_pkg = sub {
+ $3 and eval(rpmtools::version_compare($_[0]{version}, $3) . $2 . 0) || return;
+ $4 and eval(rpmtools::version_compare($_[0]{release}, $4) . $2 . 0) || return;
+ $provides{$1} = "$_[0]{name}-$_[0]{version}-$_[0]{release}";
+ };
+ rpmtools::db_traverse_tag($db, 'whatprovides', [ $1 ],
+ [ qw (name version release) ], $check_pkg);
+ rpmtools::db_traverse_tag($db, 'path', [ $1 ],
+ [ qw (name version release) ], $check_pkg);
}
});
diff --git a/urpmi.spec b/urpmi.spec
index b69bf7f4..4431317d 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 1.5
-Release: 19mdk
+Release: 20mdk
License: GPL
Source0: %{name}.tar.bz2
Summary: User mode rpm install
@@ -113,6 +113,10 @@ autoirpm.uninstall
%changelog
+* Fri Mar 9 2001 François Pons <fpons@mandrakesoft.com> 1.5-20mdk
+- check whatprovides by examining path too for mode -m.
+- fixed incorrect requires/provides association for mode -m.
+
* Wed Mar 7 2001 François Pons <fpons@mandrakesoft.com> 1.5-19mdk
- fixed default -m mode for urpmq.
- added log for getting packages (wget) and installing them.