diff options
Diffstat (limited to 'debian/bin/gencontrol_signed.py')
-rwxr-xr-x | debian/bin/gencontrol_signed.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/debian/bin/gencontrol_signed.py b/debian/bin/gencontrol_signed.py index 729309705fea..6b6e192b0c8a 100755 --- a/debian/bin/gencontrol_signed.py +++ b/debian/bin/gencontrol_signed.py @@ -54,10 +54,6 @@ class Gencontrol(Base): self.image_packages = [] - def _substitute_file(self, template, vars, target, append=False): - with codecs.open(target, 'a' if append else 'w', 'utf-8') as f: - f.write(self.substitute(self.templates[template], vars)) - def do_main_setup(self, vars, makeflags, extra): makeflags['VERSION'] = self.version.linux_version makeflags['GENCONTROL_ARGS'] = ( @@ -216,17 +212,20 @@ class Gencontrol(Base): "PACKAGE_NAME='%s' %s" % (packages_meta[0]['Package'], makeflags)] - # Include a bug presubj message directing reporters to the real - # image package. - self._substitute_file( - "image.meta.bug-presubj", vars, - self.template_debian_dir - + "/linux-image%(localversion)s.bug-presubj" % vars) + self.substitute_debhelper_config( + 'image', vars, + 'linux-image%(localversion)s' % vars, + output_dir=self.template_debian_dir) merge_packages(packages, packages_own, arch) makefile.add('binary-arch_%s_%s_%s_real' % (arch, featureset, flavour), cmds=cmds_binary_arch) + self.substitute_debhelper_config( + 'image', vars, + 'linux-image-%(abiname)s%(localversion)s' % vars, + output_dir=self.template_debian_dir) + os.makedirs(self.package_dir + '/usr/share/lintian/overrides', 0o755, exist_ok=True) with open(self.package_dir @@ -237,8 +236,6 @@ class Gencontrol(Base): + '/linux-image-%s%s.%s' % (vars['abiname'], vars['localversion'], script_base)) - self._substitute_file('image.%s' % script_base, vars, - script_name) lintian_overrides.write('%s: script-not-executable %s\n' % (vars['template'], os.path.relpath(script_name, |