summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm28
-rwxr-xr-xurpmi4
-rw-r--r--urpmi.spec7
3 files changed, 24 insertions, 15 deletions
diff --git a/urpm.pm b/urpm.pm
index dfb8477d..3d44fea9 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -718,17 +718,18 @@ sub register_local_packages {
#- examine each rpm and build the depslist for them using current
#- depslist and provides environment.
foreach (@files) {
- /(.*\/)?(.*)-([^-]*)-([^-]*)\.[^.]+\.rpm$/ or $urpm->{error}("invalid rpm file name [$_]"), next;
- $urpm->{params}->read_rpms($_);
+ /(.*\/)?[^\/]*\.rpm$/ or $urpm->{error}("invalid rpm file name [$_]"), next;
- #- update info according to version and release, for source tracking.
- $urpm->{params}{info}{$2} or $urpm->{error}("rpm file is not accessible with rpm file [$_]"), next;
- $urpm->{params}{info}{$2}{version} eq $3 or $urpm->{error}("rpm file [$_] has not right version"), next;
- $urpm->{params}{info}{$2}{release} eq $4 or $urpm->{error}("rpm file [$_] has not right release"), next;
- $urpm->{params}{info}{$2}{source} = $1 ? $_ : "./$_";
-
- #- keep in mind this package has to be installed.
- push @names, "$2-$3-$4";
+ my ($name) = $urpm->{params}->read_rpms($_);
+ if ($name =~ /(.*)-([^-]*)-([^-]*)/) {
+ my $pkg = $urpm->{params}{info}{$1};
+ $pkg->{version} eq $2 or $urpm->{error}("mismatch version for registering rpm file"), next;
+ $pkg->{release} eq $3 or $urpm->{error}("mismatch release for registering rpm file"), next;
+ $pkg->{source} = $1 ? $_ : "./$_";
+ push @names, $name;
+ } else {
+ $urpm->{error}("rpmtools::read_rpms is too old, upgrade rpmtools package");
+ }
}
#- compute depslist associated.
@@ -1021,7 +1022,7 @@ sub filter_minimal_packages_to_upgrade {
}
});
$ask_child->("$pkg->{name}-$pkg->{version}-$pkg->{release}", "provides", sub {
- /^(\S*\s*\S*\s*)(\d+:)?([^\s-]*)-?\S*/;
+ /^(\S*\s*\S*\s*)(\d+:)?([^\s-]*)(-?\S*)/;
foreach ($_, "$1$3", "$1$2$3", "$1$3$4") {
delete $diffprovides{$_};
}
@@ -1047,10 +1048,12 @@ sub filter_minimal_packages_to_upgrade {
$ask_child->("$pkg->{name}-$pkg->{version}-$pkg->{release}", "requires", sub {
if ($_[0] =~ /^(\S*)\s*(\S*)\s*([^\s-]*)-?(\S*)/) {
exists $provides{$1} and return;
+ #- 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 {
- $provides{$1} ||= undef;
$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}";
@@ -1062,6 +1065,7 @@ sub filter_minimal_packages_to_upgrade {
#- provides files, try to minimize choice at this level.
foreach (keys %provides) {
$provides{$_} and next;
+ print STDERR "provides to resolve is $_\n";
my (@choices, @upgradable_choices);
foreach (@{$urpm->{params}{provides}{$_}}) {
#- prefer upgrade package that need to be upgraded, if they are present in the choice.
diff --git a/urpmi b/urpmi
index bf550956..0eaef367 100755
--- a/urpmi
+++ b/urpmi
@@ -103,8 +103,8 @@ log_it(scalar localtime, " urpmi called with @ARGV\n");
open SAVEOUT, ">&STDOUT";
open SAVEERR, ">&STDERR";
-open STDOUT, "|tee -a /var/log/urpmi.log" or die;
-open STDERR, "|tee >&2 -a /var/log/urpmi.log" or die;
+open STDOUT, "|-", "tee >&SAVEOUT -a /var/log/urpmi.log" or die;
+open STDERR, "|-", "tee >&SAVEERR -a /var/log/urpmi.log" or die;
select STDERR; $| = 1; # make unbuffered
select STDOUT; $| = 1; # make unbuffered
diff --git a/urpmi.spec b/urpmi.spec
index ebee155b..d79e020b 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 1.5
-Release: 5mdk
+Release: 6mdk
License: GPL
Source0: %{name}.tar.bz2
Summary: User mode rpm install
@@ -113,6 +113,11 @@ autoirpm.uninstall
%changelog
+* Mon Feb 19 2001 François Pons <fpons@mandrakesoft.com> 1.5-6mdk
+- fixed urpmq --headers with exotic rpm filename.
+- fixed closing using tee (need testing).
+- fixed missing dependancies resolution using -m mode.
+
* Mon Feb 19 2001 François Pons <fpons@mandrakesoft.com> 1.5-5mdk
- fixed -m mode for prompting user if needed.
- fixed -m mode with depandancies resolving.