aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-installer/anaconda/files/0047-remove-incorrect-prefix-of-addon-repo-url.patch
blob: 4a8240425138f97c1b1e9c4eb0897d701faf96fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From bf3c8c08ecfc4e60501b07686aa22b0de7e135f2 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Wed, 25 Jul 2018 10:47:12 +0800
Subject: [PATCH 47/65] remove incorrect prefix of addon repo url

While user set addon repo url with "http://128.224.162.227/intel_x86_64/",
it has incorrect prefix "http://http://128.224.162.227/intel_x86_64/".

So remove incorrect prefix of addon repo url.

Upstream-Status: Pending

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 pyanaconda/ui/gui/spokes/installation_source.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pyanaconda/ui/gui/spokes/installation_source.py b/pyanaconda/ui/gui/spokes/installation_source.py
index 89e51b5..9144785 100644
--- a/pyanaconda/ui/gui/spokes/installation_source.py
+++ b/pyanaconda/ui/gui/spokes/installation_source.py
@@ -1587,6 +1587,9 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler):
         url_prefix = REPO_PROTO[combo_protocol]
 
         url = self._repoUrlEntry.get_text().strip()
+        if url.startswith(url_prefix):
+            url = url[len(url_prefix):]
+
         if combo_protocol in (PROTOCOL_HTTP, PROTOCOL_HTTPS):
             url_type = self._repoUrlTypeComboBox.get_active_id()
             repo.baseurl = repo.mirrorlist = repo.metalink = ""
-- 
2.7.4