diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | urpm/install.pm | 9 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,6 @@ +- library: + o fix installing delta rpms (it never worked before) + Version 7.10 - 17 October 2012, by Thierry Vignaud - do not offer to remove DKMS modules for current kernel (mga#5092) diff --git a/urpm/install.pm b/urpm/install.pm index 67f97ecf..15f1127c 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -194,15 +194,22 @@ sub _schedule_packages { foreach (keys %$mode) { my $pkg = $urpm->{depslist}[$_]; $pkg->update_header($mode->{$_}, keep_all_tags => 1); + my $true_pkg; if ($pkg->payload_format eq 'drpm') { #- handle deltarpms my $true_rpm = urpm::sys::apply_delta_rpm($mode->{$_}, "$urpm->{cachedir}/rpms", $pkg); if ($true_rpm) { push @produced_deltas, ($mode->{$_} = $true_rpm); #- fix path + if (my ($id) = $urpm->parse_rpm($true_rpm)) { + $true_pkg = defined $id && $urpm->{depslist}[$id]; + $mode->{$id} = $true_rpm; + } else { + $urpm->{error}("Failed to parse $true_pkg"); + } } else { $urpm->{error}(N("unable to extract rpm from delta-rpm package %s", $mode->{$_})); } } - if ($trans->add($pkg, update => $update, + if ($trans->add($true_pkg || $pkg, update => $update, $options{excludepath} ? (excludepath => [ split /,/, $options{excludepath} ]) : ())) { $urpm->{debug} and $urpm->{debug}( sprintf('trans: scheduling %s of %s (id=%d, file=%s)', |