From 413fadb4aa9230214b845df4b98b3399dce923ef Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Thu, 20 Aug 2020 10:19:15 +0200 Subject: [PATCH] Factor out debug info disable flag --- debian/bin/gencontrol.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index e66a38a9b..93b27ddf1 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -59,6 +59,7 @@ class Gencontrol(Base): } env_flags = [ + ('DEBIAN_KERNEL_DISABLE_DEBUG', 'disable_debug', 'debug infos'), ('DEBIAN_KERNEL_DISABLE_INSTALLER', 'disable_installer', 'installer modules'), ] @@ -487,18 +488,7 @@ class Gencontrol(Base): build_debug = config_entry_build.get('debug-info') - if os.getenv('DEBIAN_KERNEL_DISABLE_DEBUG'): - if self.changelog[0].distribution == 'UNRELEASED': - import warnings - warnings.warn('Disable debug infos on request ' - '(DEBIAN_KERNEL_DISABLE_DEBUG set)') - build_debug = False - else: - raise RuntimeError( - 'Unable to disable debug infos in release build ' - '(DEBIAN_KERNEL_DISABLE_DEBUG set)') - - if build_debug: + if not self.disable_debug: makeflags['DEBUG'] = True packages_own.extend(self.process_packages( self.templates['control.image-dbg'], vars))