From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AF65C1382C5 for ; Sun, 31 May 2020 23:58:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CFF26E089D; Sun, 31 May 2020 23:58:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B6651E089D for ; Sun, 31 May 2020 23:58:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8A4A234EFAD for ; Sun, 31 May 2020 23:58:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0C1281F9 for ; Sun, 31 May 2020 23:58:11 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1590960614.c238d5f7ed264179c263f5a2da983c4ee50b4f00.floppym@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/package/ebuild/fetch.py X-VCS-Directories: lib/portage/package/ebuild/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: c238d5f7ed264179c263f5a2da983c4ee50b4f00 X-VCS-Branch: master Date: Sun, 31 May 2020 23:58:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bd566da9-6107-4ed8-8fe1-7572cc12d0ff X-Archives-Hash: b6c14042082f3af743f30540af4b03f6 commit: c238d5f7ed264179c263f5a2da983c4ee50b4f00 Author: Mike Gilbert gentoo org> AuthorDate: Sun May 31 21:24:25 2020 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sun May 31 21:30:14 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c238d5f7 Escape percent-signs in portage.package.ebuild.fetch.get_mirror_url() This avoids double-escaping in emirrordist. We only want to escape the path when fetching the file from the mirror, not when mirroring the file. Bug: https://bugs.gentoo.org/719810 Fixes: 4c18f523bb86a8be4c148f365dabee06fca2e4fa Signed-off-by: Mike Gilbert gentoo.org> lib/portage/package/ebuild/fetch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py index 28e7caf53..9682fea89 100644 --- a/lib/portage/package/ebuild/fetch.py +++ b/lib/portage/package/ebuild/fetch.py @@ -26,6 +26,11 @@ try: except ImportError: from urlparse import urlparse +try: + from urllib.parse import quote as urlquote +except ImportError: + from urllib import quote as urlquote + import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage.package.ebuild.config:check_config_instance,config', @@ -520,7 +525,7 @@ def get_mirror_url(mirror_url, filename, mysettings, cache_path=None): f.close() return (mirror_url + "/distfiles/" + - mirror_conf.get_best_supported_layout().get_path(filename)) + urlquote(mirror_conf.get_best_supported_layout().get_path(filename))) def fetch(myuris, mysettings, listonly=0, fetchonly=0,