[elbe-devel] [PATCH] Prevent uninitialized variable
bage at linutronix.de
bage at linutronix.de
Thu Mar 25 11:19:17 CET 2021
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>
---
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
More information about the elbe-devel
mailing list