Description of problem: urpmi doesn't work with aria2 & proxy without user How reproducible: If urpmi is configured with aria2 & proxy without user, it doesn't work. Configuration example: # cat /etc/urpmi/proxy.cfg http_proxy=127.0.0.1:5865 ftp_proxy=127.0.0.1:5865 # grep aria2 /etc/urpmi/urpmi.cfg downloader: aria2 Error that appears: #urpmi -auto-update Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'. -> [OptionHandlerImpl.cc:551] errorCode=1 unrecognized proxy format Usage: --all-proxy=PROXY Use this proxy server for all protocols. To erase previously defined proxy, use "". You can override this setting and specify a proxy server for a particular protocol using --http-proxy, --https-proxy and --ftp-proxy options. This affects all URLs. Possible Values: [http://][USER:PASSWORD@]HOST[:PORT] Tags: #http, #https, #ftp ...retrieving failed: aria2 failed: exited with 28 The problem is that an extra @ is printed when invoking aria2. To correct it, the following change must be done in /usr/lib/perl5/vendor_perl/5.16.3/urpm/download.pm: # diff /usr/lib/perl5/vendor_perl/5.16.3/urpm/download.pm.old /usr/lib/perl5/vendor_perl/5.16.3/urpm/download.pm 281c281 < $allproxy .= "@"; --- > $allproxy .= "@" if $p->{user}; With this change, @ is only printed when user is defined Reproducible: Steps to Reproduce:
Keywords: (none) => TriagedAssignee: bugsquad => thierry.vignaud
Same problem today, 2 september 2014 : an extra @ is printed when invoking aria2 when the proxy does not need a user. [root@zzz ~]# urpmi.addmedia --distrib --mirrorlist 'http://mirrors.mageia.org/api/mageia.4.x86_64.list' --debug getting exclusive lock on urpmi parsing: /etc/urpmi/mediacfg.d/Official-4-x86_64 parsing: /etc/urpmi/mediacfg.d/Official-4.1-x86_64 loading mirrors cache using mirror ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/x86_64 récupération du fichier media.cfg... récupération de http://mirrors.mageia.org/api/mageia.4.x86_64.list media/media_info/media.cfg '/usr/bin/aria2c' '--log' '/var/cache/urpmi/partial/.aria2.log' '--auto-file-renaming=false' '--ftp-pasv' '--summary-interval=0' '--follow-metalink=mem' '--metalink-enable-unique-protocol=true' '--metalink-preferred-protocol=http' '--max-tries=5' '--lowest-speed-limit=20K' '--timeout' '3' '--split=3' '--uri-selector=adaptive' '--server-stat-if=/root/.aria2-adaptive-stats' '--server-stat-of=/root/.aria2-adaptive-stats' '--max-file-not-found=9' '--connect-timeout=6' '-Z' '-j1' '--allow-overwrite=true' '--all-proxy=http://@proxy-web.univ-fcomte.fr:3128' '/var/cache/urpmi/.metalink' Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--all-proxy'. -> [OptionHandlerImpl.cc:508] errorCode=1 unrecognized proxy format Usage: --all-proxy=PROXY Use this proxy server for all protocols. To erase previously defined proxy, use "". You can override this setting and specify a proxy server for a particular protocol using --http-proxy, --https-proxy and --ftp-proxy options. This affects all URLs. Possible Values: [http://][USER:PASSWORD@]HOST[:PORT] Tags: #http, #https, #ftp error: aria2 a échoué : sortie avec 28 ... échec de la récupération : aria2 a échoué : sortie avec 28 we have : '--all-proxy=http://@proxy-web.univ-fcomte.fr:3128' instead of : '--all-proxy=http://proxy-web.univ-fcomte.fr:3128' Mageia 4, Per 5.18 : /usr/lib/perl5/vendor_perl/5.18.1/urpm/download.pm i used the solution proposed by Javier Diaz. < $allproxy .= "@"; should be : > $allproxy .= "@" if $p->{user}; Thanks in advance to take into account this correction for Mageia 5 ! ;) Ernest.
CC: (none) => ernest.chiarello
so the patch works ?
Version: 3 => 4Whiteboard: (none) => MGA3TOO
Hello, I'm upgrading to MGA5 and this is still failing, when urpmi rpm was upgraded, my fix was lost and the error appeared again. ¿Is it possible to include the fix in urpmi package? Thanks!
Version: 4 => 5Source RPM: urpmi-7.27.3-2.mga3 => urpmi-8.06-1.mga5Severity: normal => major
Whiteboard: MGA3TOO => MGA3TOO MGA4TOO
Thierry, why are you ignoring this bug? :)
CC: (none) => mageia
Keywords: (none) => PATCHStatus: NEW => ASSIGNED
commit 8528697f7a1209761058dcb15897dab8bc87b158 Author: Thierry Vignaud <thierry.vignaud@...> Date: Wed Aug 26 22:26:49 2015 +0200 fix using a proxy without an auth user (mga#11265) --- Commit Link: http://gitweb.mageia.org/software/rpm/urpmi/commit/?id=8528697f7a1209761058dcb15897dab8bc87b158
Fixed in git
Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED
commit 8a252bf031a37e0151a1ead1dd0adf5ce6f2acaf Author: Thierry Vignaud <thierry.vignaud@...> Date: Wed Aug 26 22:26:49 2015 +0200 fix using a proxy without an auth user (mga#11265) --- Commit Link: http://gitweb.mageia.org/software/rpm/urpmi/commit/?id=8a252bf031a37e0151a1ead1dd0adf5ce6f2acaf