[elbe-devel] [PATCH] Prevent uninitialized variable
Torben Hohn
torben.hohn at linutronix.de
Mon Mar 29 11:58:49 CEST 2021
On Thu, Mar 25, 2021 at 11:19:17AM +0100, bage at linutronix.de wrote:
> From: Bastian Germann <bage at linutronix.de>
>
> With 990f94cf76 (rfs: fix cdrom build keyring problems), an uninitialized
> variable case for 'keyring' was introduced when using noauth setting.
>
> Fixes #297.
>
> Signed-off-by: Bastian Germann <bage at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> ---
> elbepack/rfs.py | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index 5e3b07ac0..d8627deff 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -198,6 +198,7 @@ class BuildEnv:
> includepkgs = "gnupg"
>
> strapcmd += ' --include="%s"' % includepkgs
> + keyring = ''
>
> if not self.xml.is_cross(host_arch):
> if self.xml.has("project/noauth"):
> @@ -207,8 +208,6 @@ class BuildEnv:
> if self.xml.has("project/mirror/cdrom"):
> keyring = ' --keyring="%s"' % (
> self.rfs.fname('/elbe.keyring'))
> - else:
> - keyring = ''
>
> cmd = '%s --arch=%s %s "%s" "%s" "%s"' % (
> strapcmd, arch, keyring, suite, self.rfs.path, primary_mirror)
> @@ -237,8 +236,6 @@ class BuildEnv:
> if self.xml.has("project/mirror/cdrom"):
> keyring = ' --keyring="%s"' % (
> self.rfs.fname('/elbe.keyring'))
> - else:
> - keyring = ''
>
> cmd = '%s --foreign --arch=%s %s "%s" "%s" "%s"' % (
> strapcmd, arch, keyring, suite, self.rfs.path, primary_mirror)
> --
> 2.30.2
>
> _______________________________________________
> 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