summaryrefslogtreecommitdiffstats
path: root/urpm/install.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-11-16 20:11:28 +0000
committerThierry Vignaud <tv@mageia.org>2012-11-16 20:11:28 +0000
commitb7b740b82f1f504e215dd48237ded85ba74217ca (patch)
tree159835127d99950c9435edb59c94473029d13ce1 /urpm/install.pm
parent3336a22db38bd534110b298e3c7bc28df4555d4c (diff)
downloadurpmi-b7b740b82f1f504e215dd48237ded85ba74217ca.tar
urpmi-b7b740b82f1f504e215dd48237ded85ba74217ca.tar.gz
urpmi-b7b740b82f1f504e215dd48237ded85ba74217ca.tar.bz2
urpmi-b7b740b82f1f504e215dd48237ded85ba74217ca.tar.xz
urpmi-b7b740b82f1f504e215dd48237ded85ba74217ca.zip
(_schedule_packages) fix installing delta rpms
broken for years (actually it _NEVER_ worked...)
Diffstat (limited to 'urpm/install.pm')
-rw-r--r--urpm/install.pm9
1 files changed, 8 insertions, 1 deletions
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)',