[elbe-devel] [PATCH 15/20] debinstaller: move LOCALMACHINE replacement into get_primary_mirror()

Torben Hohn torben.hohn at linutronix.de
Fri Oct 12 11:28:01 CEST 2018


the result of debinstaller.get_primary_mirror() is only used in
download_kinitrd() move the replacement of LOCALMACHINE from
download_kinitrd() into get_primary_mirror()

this prepares to use the urlopener in the next patch.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/debinstaller.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/elbepack/debinstaller.py b/elbepack/debinstaller.py
index c7df027d..de4f3696 100644
--- a/elbepack/debinstaller.py
+++ b/elbepack/debinstaller.py
@@ -143,8 +143,7 @@ def download_release(tmp, base_url):
         sig.close()
 
 def download_kinitrd(tmp, suite, mirror):
-    base_url = "%s/dists/%s/" % (
-        mirror.replace("LOCALMACHINE", "localhost"), suite)
+    base_url = "%s/dists/%s/" % (mirror, suite)
     installer_path = "main/installer-amd64/current/images/"
 
     setup_apt_keyring(tmp.fname('/'), 'pubring.gpg')
@@ -195,7 +194,7 @@ def get_primary_mirror(prj):
     else:
         raise NoKinitrdException("Broken xml file: no cdrom and no primary host")
 
-    return mirror
+    return mirror.replace("LOCALMACHINE", "10.0.2.2")
 
 def copy_kinitrd(prj, target_dir):
 
-- 
2.11.0




More information about the elbe-devel mailing list