[kernel] r7041 - in people/waldi/linux-modules-extra-2.6:
debian/templates redhat-cluster
Bastian Blank
waldi at costa.debian.org
Wed Jul 19 21:01:30 UTC 2006
Author: waldi
Date: Wed Jul 19 21:01:22 2006
New Revision: 7041
Added:
people/waldi/linux-modules-extra-2.6/redhat-cluster/
Modified:
people/waldi/linux-modules-extra-2.6/debian/bin/gencontrol.py
people/waldi/linux-modules-extra-2.6/debian/templates/control.modules.in
Log:
* debian/bin/gencontrol.py
- Read own config.
- Produce entries per module.
* debian/templates/control.modules.in
- Update package names.
- Set section to admin.
Modified: people/waldi/linux-modules-extra-2.6/debian/bin/gencontrol.py
==============================================================================
--- people/waldi/linux-modules-extra-2.6/debian/bin/gencontrol.py (original)
+++ people/waldi/linux-modules-extra-2.6/debian/bin/gencontrol.py Wed Jul 19 21:01:22 2006
@@ -2,13 +2,29 @@
import sys
sys.path.append(sys.argv[1] + "/lib/python")
import debian_linux.gencontrol
-from debian_linux.config import *
+from debian_linux import config
from debian_linux.debian import *
class gencontrol(debian_linux.gencontrol.gencontrol):
- def __init__(self, config):
- super(gencontrol, self).__init__(config)
- self.process_config_version(config_parser({}, [sys.argv[1] + "/version"]))
+ def __init__(self, configdir):
+ super(gencontrol, self).__init__(configdir)
+ self.process_config_version(config.config_parser({}, [sys.argv[1] + "/version"]))
+ self.config = config_reader_modules(self.config)
+
+ def do_main(self, packages, makefile):
+ config_entry = self.config['base',]
+ vars = self.vars.copy()
+ vars.update(config_entry)
+
+ makeflags = {}
+ extra = {}
+
+ self.do_main_setup(vars, makeflags, extra)
+ self.do_main_packages(packages, extra)
+ self.do_main_makefile(makefile, makeflags, extra)
+
+ for module in iter(self.config['base',]['modules']):
+ self.do_module(module, packages, makefile, vars.copy(), makeflags.copy(), extra)
def do_main_packages(self, packages, extra):
vars = self.vars
@@ -21,6 +37,16 @@
for arch in self.config['base',]['arches']],
)
+ def do_module(self, module, packages, makefile, vars, makeflags, extra):
+ config_entry = self.config['base', module]
+ vars.update(config_entry)
+ vars['module'] = module
+ extra['module'] = module
+ makeflags['MODULE'] = module
+
+ for arch in iter(self.config.merge('base', module)['arches']):
+ self.do_arch(packages, makefile, arch, vars.copy(), makeflags.copy(), 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)
@@ -53,5 +79,57 @@
self.process_version(parse_version(entry['source']))
self.vars['abiname'] = self.abiname = entry['abiname']
+class config_reader_modules(config.config_reader):
+ schema_base = {
+ 'modules': config.schema_item_list(),
+ }
+
+ schema_module = {
+ 'arches': config.schema_item_list(),
+ }
+
+ def __init__(self, arch):
+ super(config_reader_modules, self).__init__(['.'])
+ self._read_base()
+
+ for section in iter(arch):
+ s1 = self.get(section, {})
+ s2 = arch[section].copy()
+ s2.update(s1)
+ self[section] = s2
+
+ def _read_base(self):
+ config_file = config.config_parser(self.schema_base, self._get_files(self.config_name))
+
+ modules = config_file['base',]['modules']
+
+ for section in iter(config_file):
+ real = list(section)
+ if real[-1] in modules:
+ real.insert(0, 'base')
+ else:
+ real.insert(0, real.pop())
+ self[tuple(real)] = config_file[section]
+
+ for module in modules:
+ self._read_module(module)
+
+ def _read_module(self, module):
+ config_file = config.config_parser(self.schema_base, self._get_files("%s/%s" % (module, self.config_name)))
+
+ for section in iter(config_file):
+ real = list(section)
+ real[0:] = [real.pop(), module]
+ real = tuple(real)
+ s = self.get(real, {})
+ s.update(config_file[section])
+ self[real] = s
+
+ def merge(self, section, module, *args):
+ ret = {}
+ ret.update(super(config_reader_modules, self).merge(section, *args))
+ ret.update(super(config_reader_modules, self).merge(section, module, *args))
+ return ret
+
if __name__ == '__main__':
gencontrol(sys.argv[1] + "/arch")()
Modified: people/waldi/linux-modules-extra-2.6/debian/templates/control.modules.in
==============================================================================
--- people/waldi/linux-modules-extra-2.6/debian/templates/control.modules.in (original)
+++ people/waldi/linux-modules-extra-2.6/debian/templates/control.modules.in Wed Jul 19 21:01:22 2006
@@ -1,14 +1,14 @@
-Package: linux-modules-extra- at upstreamversion@@abiname@@localversion@
-Section: base
+Package: @module at -@upstreamversion@@abiname@@localversion@
+Section: admin
Priority: optional
-Description: Extra modules for Linux kernel @upstreamversion@ on @class@ machines
- This package provides the extra loadable modules for the Linux kernel version
+Description: @desc@ modules for Linux kernel @upstreamversion@ on @class@ machines
+ This package provides the @desc@ modules for the Linux kernel version
@upstreamversion@ on @longclass@ machines.
-Package: linux-modules-extra- at major@@localversion@
-Section: base
+Package: @module at -@major@@localversion@
+Section: admin
Priority: optional
-Description: Extra modules for Linux kernel @major@ on @class@ machines
- This package depends on the extra modules for latest Linux kernel @major@ on
+Description: @desc@ modules for Linux kernel @major@ on @class@ machines
+ This package depends on the @desc@ modules for latest Linux kernel @major@ on
@longclass@ machines.
More information about the Kernel-svn-changes
mailing list