summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-02 07:24:30 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-06-02 07:24:30 +0000
commit6fbc3cbea8cb4180d0f14f7988c969b0c20cfc8a (patch)
treec387d53ac6e486615642b965758a9f2413612a7c /urpm.pm
parentab22c28406edf9904ccf1006cef1d59c5baabb0f (diff)
downloadurpmi-6fbc3cbea8cb4180d0f14f7988c969b0c20cfc8a.tar
urpmi-6fbc3cbea8cb4180d0f14f7988c969b0c20cfc8a.tar.gz
urpmi-6fbc3cbea8cb4180d0f14f7988c969b0c20cfc8a.tar.bz2
urpmi-6fbc3cbea8cb4180d0f14f7988c969b0c20cfc8a.tar.xz
urpmi-6fbc3cbea8cb4180d0f14f7988c969b0c20cfc8a.zip
Add support for deltarpms
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index b112d8c2..68165464 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2928,6 +2928,7 @@ sub install {
}
my ($update, @l) = 0;
+ my @produced_deltas;
foreach (@$remove) {
if ($trans->remove($_)) {
@@ -2940,8 +2941,17 @@ sub install {
foreach (keys %$mode) {
my $pkg = $urpm->{depslist}[$_];
$pkg->update_header($mode->{$_});
+ 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
+ } else {
+ $urpm->{error}(N("unable to extract rpm from delta-rpm package %s", $mode->{$_}));
+ }
+ }
if ($trans->add($pkg, update => $update,
- $options{excludepath} ? (excludepath => [ split ',', $options{excludepath} ]) : ())) {
+ $options{excludepath} ? (excludepath => [ split /,/, $options{excludepath} ]) : ()
+ )) {
$urpm->{log}(N("adding package %s (id=%d, eid=%d, update=%d, file=%s)", scalar($pkg->fullname),
$_, $pkg->id, $update, $mode->{$_}));
} else {
@@ -2993,6 +3003,7 @@ sub install {
}
}
}
+ unlink @produced_deltas;
#- now exit or return according to current status.
if (defined $pid && !$pid) { #- child process