tag 436260 + patch kthxbye On Tue, Aug 07, 2007 at 06:41:56PM +0200, Bastian Blank wrote:
> severity 436260 normal I don't understand why you have lowered the severity here - currently it appears to be impossible to build out of tree modules which use the build infrastructure provided by the kernel team. > On Mon, Aug 06, 2007 at 08:03:13PM +0100, Mark Brown wrote: > > tag 436260 + patch > There is no patch attached. Sorry, here's the updated gencontrol.py. I've not generated a patch since I don't really know what to generate it against. -- "You grabbed my hand and we fell into it, like a daydream - or a fever."
#!/usr/bin/env python2.4 import sys sys.path.append(sys.argv[1] + "/lib/python") from debian_linux.gencontrol import Gencontrol from debian_linux.gencontrol import PackagesList from debian_linux.config import * from debian_linux.debian import * from debian_linux.config import ConfigParser class gencontrol(Gencontrol): def __init__(self, config): Gencontrol.__init__(self, config) self.process_config_version(ConfigParser({}, [sys.argv[1] + "/version"])) def __call__(self): packages = PackagesList() makefile = [('.NOTPARALLEL:', ())] self.do_source(packages) self.do_main(packages, makefile) self.do_extra(packages, makefile) self.write_control(packages.itervalues()) self.write_makefile(makefile) def do_main_packages(self, packages, extra): vars = self.vars main = self.templates["control.main"] packages.extend(self.process_packages(main, vars)) packages['source']['Build-Depends'].extend( ['linux-support-%s%s' % (self.version.upstream, self.abiname)] ) packages['source']['Build-Depends'].extend( ['linux-headers-%s%s-all-%s [%s]' % (self.version.upstream, self.abiname, arch, arch) for arch in self.config['base',]['arches']], ) def do_flavour(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra): config_entry = self.config.merge('base', arch, subarch, flavour) if config_entry.get('modules', True) is False: return Gencontrol.do_flavour(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra) def do_flavour_packages(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra): modules = self.templates["control.modules"] modules = self.process_packages(modules, vars) for package in modules: name = package['Package'] if packages.has_key(name): package = packages.get(name) package['Architecture'].append(arch) else: package['Architecture'] = [arch] packages.append(package) makeflags_string = ' '.join(["%s='%s'" % i for i in makeflags.iteritems()]) cmds_binary_arch = [] cmds_binary_arch.append(("$(MAKE) -f debian/rules.real binary-arch-flavour %s" % makeflags_string,)) cmds_build = [] cmds_build.append(("$(MAKE) -f debian/rules.real build %s" % makeflags_string,)) cmds_setup = [] cmds_setup.append(("$(MAKE) -f debian/rules.real setup-flavour %s" % makeflags_string,)) makefile.append(("binary-arch-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_binary_arch)) makefile.append(("build-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_build)) makefile.append(("setup-%s-%s-%s-real:" % (arch, subarch, flavour), cmds_setup)) def process_config_version(self, config): entry = config['version',] self.version = VersionLinux(entry['source']) self.abiname = entry['abiname'] self.vars = self.process_version_linux(self.version, self.abiname) if __name__ == '__main__': gencontrol(sys.argv[1] + "/arch")()
signature.asc
Description: Digital signature