This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new bceec5c  AMBARI-25450. [ubuntu16] HDP install failed for upgrade from  
HDP-3.0.1.0-187 to HDP-3.1.5.0-139 (aonishuk)
bceec5c is described below

commit bceec5c53cdc50afb0f0809c58775d64df6871dd
Author: Andrew Onishuk <aonis...@hortonworks.com>
AuthorDate: Mon Dec 16 12:49:32 2019 +0200

    AMBARI-25450. [ubuntu16] HDP install failed for upgrade from  
HDP-3.0.1.0-187 to HDP-3.1.5.0-139 (aonishuk)
---
 .../src/main/python/ambari_commons/repo_manager/apt_manager.py       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py 
b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
index eba8dfb..f7fbab9 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
@@ -155,7 +155,7 @@ class AptManager(GenericManager):
 
   def transform_baseurl_to_repoid(self, base_url):
     """
-    Transforms the URL looking like proto://localhost/some/long/path to 
localhost_some_long_path
+    Transforms the URL looking like 
proto://login:password@localhost/some/long/path to localhost_some_long_path
 
     :type base_url str
     :rtype str
@@ -165,6 +165,9 @@ class AptManager(GenericManager):
     if url_proto_pos > 0:
       base_url = base_url[url_proto_pos+len(url_proto_mask):]
 
+    if "@" in base_url:
+      base_url = base_url.split("@", 1)[1]
+
     return base_url.replace("/", "_").replace(" ", "_")
 
   def get_available_packages_in_repos(self, repos):

Reply via email to