debian/bin/ 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

(cherry picked from commit 36f061ce80471a0203c174c4e241b70af913c260)
This commit is contained in:
Ben Hutchings 2020-09-17 19:07:36 +01:00
parent 06c8891774
commit 196afb7474
1 changed files with 5 additions and 2 deletions

View File

@ -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')
build_debug = False
if build_debug:
makeflags['DEBUG'] = True
self.templates['control.image-dbg'], vars))