[elbe-devel] [PATCH] Remove duplicated slashes from primary mirror

Torben Hohn torben.hohn at linutronix.de
Wed Jun 16 09:55:11 CEST 2021


On Wed, Jun 09, 2021 at 11:32:12AM +0000, Braunwarth, Daniel wrote:
> This patch removes any duplicated slashes in the primary mirror URL.
> 
> This patch fixes #272.
> 
> Signed-off-by: Daniel Braunwarth <daniel.braunwarth at kuka.com>
> ---
>  elbepack/debinstaller.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/elbepack/debinstaller.py b/elbepack/debinstaller.py
> index d880e5e34..7d4c5dc21 100644
> --- a/elbepack/debinstaller.py
> +++ b/elbepack/debinstaller.py
> @@ -196,8 +196,8 @@ def get_primary_mirror(prj):
>          m = prj.node("mirror")
>  
>          mirror = m.text("primary_proto") + "://"
> -        mirror += m.text("primary_host") + "/"
> -        mirror += m.text("primary_path")
> +        mirror += f"{m.text('primary_host')}/{m.text('primary_path')}" \
> +                  .replace("//", "/")

This code is running outside of the initvm.
We have not yet decided to drop stretch support, and f strings are not
supported in debian stretch.

Please implement this without f strings.


>      else:
>          raise NoKinitrdException("Broken xml file: "
>                                   "no cdrom and no primary host")
> -- 
> 2.32.0
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner


More information about the elbe-devel mailing list