summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--urpm/download.pm3
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 0ded4ca2..6dfd0e70 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- adjust parsing of aria2 output for aria2 1.4, fixes bug #51354, patch from
+ Funda Wang
- use urpmi log API for the transaction failed message instead of
printing it on the console so that installer can save each error
with each transaction log instead of only having a summary at end
diff --git a/urpm/download.pm b/urpm/download.pm
index 63478f26..a2669919 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -723,7 +723,8 @@ sub _parse_aria2_output {
propagate_sync_callback($options, 'start', $file)
if !$options->{is_retry};
}
- if ($buf =~ m!^\[#\d*\s+\S+:([\d\.]+\w*).([\d\.]+\w*)\S([\d]+)\S+\s+\S+\s*([\d\.]+)\s\w*:([\d\.]+\w*/\w)\s\w*:(\d+\w*)\]$!) {
+ #parses aria2c: [#1 SIZE:176.0KiB/2.5MiB(6%) CN:3 SPD:256.22KiBs ETA:09s]
+ if ($buf =~ m!^\[#\d*\s+\S+:([\d\.]+\w*).([\d\.]+\w*)\S([\d]+)\S+\s+\S+\s*([\d\.]+)\s\w*:([\d\.]+\w*)\s\w*:(\d+\w*)\]$!) {
my ($total, $percent, $speed, $eta) = ($2, $3, $5, $6);
#- $1 = current downloaded size, $4 = connections
if (propagate_sync_callback($options, 'progress', $file, $percent, $total, $eta, $speed) eq 'canceled') {