From 196afb7474a6ec6df3fda09f260663fc28b18cb0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 17 Sep 2020 19:07:36 +0100 Subject: [PATCH] debian/bin/gencontrol.py: Fix handling of debug info switches Setting $DEBIAN_KERNEL_DISABLE_DEBUG or clearing the [build]debug-info config variable should disable generation of debug info and associated packages. However the recent refactoring of the handling of such environment variables resulted in different switches being obeyed in different places. Set the build_debug variable based on both switches and then use that consistently. (cherry picked from commit 36f061ce80471a0203c174c4e241b70af913c260) --- debian/bin/gencontrol.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index df289e07b..1366a2aae 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -496,9 +496,12 @@ class Gencontrol(Base): if config_entry_build.get('vdso', False): makeflags['VDSO'] = True - build_debug = config_entry_build.get('debug-info') - if not self.disable_debug: + build_debug = config_entry_build.get('debug-info') + else: + build_debug = False + + if build_debug: makeflags['DEBUG'] = True packages_own.extend(self.process_packages( self.templates['control.image-dbg'], vars))