From fd62b55281f1493f24bd4dd0a9c6a2c078390221 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sun, 4 Jul 2004 15:24:14 +0000 Subject: rationalise module handling in kernel packages and MACHINE.conf files. changed module naming to use - rather than + as replacement for underscore. ignore errors from update-modules in postinst, in case modutils-collateral is in use. add postrm scripts. BKrev: 40e8211eLQcjqqTncCe6a_iEukTM_g --- classes/kernel.oeclass | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'classes/kernel.oeclass') diff --git a/classes/kernel.oeclass b/classes/kernel.oeclass index 35884000a3..a0b26e33b9 100644 --- a/classes/kernel.oeclass +++ b/classes/kernel.oeclass @@ -85,10 +85,14 @@ if [ -n "$D" ]; then ${HOST_PREFIX}depmod -A -b $D -F $D/boot/System.map-${PV} $VER else depmod -A - update-modules + update-modules || true fi } +pkg_postrm_modules () { +update-modules || true +} + autoload_postinst_fragment() { if [ x"$D" = "x" ]; then modprobe %s @@ -184,7 +188,7 @@ python populate_packages_prepend () { m = re.match(pattern, os.path.basename(i)) if not m: continue - on = m.group(1).lower().replace('_', '+').replace('@', '+') + on = legitimize_package_name(m.group(1)) dependencies.append(format % on) return dependencies return [] @@ -219,7 +223,7 @@ python populate_packages_prepend () { f.close() files = oe.data.getVar('FILES_%s' % pkg, d, 1) - files = "%s %s/etc/modutils/%s %s/etc/modutils/%s.conf" % (files, dvar, basename, dvar, basename) + files = "%s /etc/modutils/%s /etc/modutils/%s.conf" % (files, basename, basename) oe.data.setVar('FILES_%s' % pkg, files, d) if vals.has_key("description"): @@ -239,7 +243,8 @@ python populate_packages_prepend () { module_pattern = 'kernel-module-%s' postinst = oe.data.getVar('pkg_postinst_modules', d, 1) - do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, recursive=True, hook=frob_metadata, extra_depends='update-modules') + postrm = oe.data.getVar('pkg_postrm_modules', d, 1) + do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules') import re, os metapkg = "kernel-modules" @@ -248,7 +253,7 @@ python populate_packages_prepend () { blacklist = [] for l in module_deps.values(): for i in l: - pkg = module_pattern % re.match(module_regex, os.path.basename(i)).group(1).lower().replace('_', '+').replace('@', '+') + pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) blacklist.append(pkg) metapkg_rdepends = [] packages = oe.data.getVar('PACKAGES', d, 1).split() -- cgit v1.2.3