It's fairly obvious that the default module lists for Linux should be moved to the linux-2.6 source package. We can do that right now and use relative paths to include them in the per-architecture/flavour lists. However the #include <foo-modules> syntax would then be unused. It seems like it would be better to allow overriding the directory that is searched. Also, kernel-wedge has a single package template shared between Linux and kFreeBSD. Is this necessary? (I don't know how the installer selects module packages to use.) Should the Linux package template also be moved to the linux-2.6 source package? I was considering changing kernel-wedge to support a KW_DEFCONFIG_DIR variable, similar to the KW_CONFIG_DIR variable, that would affect where all of these files are looked for. The (untested) change is pretty small: diff --git a/README b/README index 6bf5b87..df52199 100644 --- a/README +++ b/README @@ -84,7 +84,12 @@ Suppose we want a different set of modules in the speakup flavored kernel. Then create a modules/<arch>-<flavor>/nic-modules instead, it will be used by preference. One udeb will be created for each modules list file, containing the listed modules. The names of the files should match the -names of the various modules listed in /usr/share/kernel-wedge/package-list. +names of the various modules listed in the package-list file in the +default-configuration directory. + +The default-configuration directory is either specified by the +environment variable $KW_DEFCONFIG_DIR or else defaults to +/usr/share/kernel-wedge. You will also want a special modules list file for the kernel-image udeb. If you need to include no modules with your kernel, it can be an empty file. @@ -104,6 +109,9 @@ distributed as part of kernel-wedge, or others. For example: # my own list #include "../../includes/cdrom-modules" +The <name> syntax includes a file from the modules subdirectory of the +default-configuration directory. + A final capability of the module list files is the ability to include a module list and then override parts of it. Follow a module name with " -" to remove it from the list if it was previously listed, as by an include: diff --git a/commands/gen-control b/commands/gen-control index 5ec7bbf..afffa2d 100755 --- a/commands/gen-control +++ b/commands/gen-control @@ -11,6 +11,7 @@ my %packages; my @builddeps; my %excluded; +my $defconfigdir = ($ENV{KW_DEFCONFIG_DIR} || '/usr/share/kernel-wedge'); my $configdir = ($ENV{KW_CONFIG_DIR} || '.'); my $fixkernelversion = $ARGV[0]; @@ -110,7 +111,7 @@ sub read_package_list } close LIST; } -read_package_list("/usr/share/kernel-wedge/package-list"); +read_package_list("$defconfigdir/package-list"); read_package_list("$configdir/package-list"); foreach my $ver (@versions) { diff --git a/commands/gen-deps b/commands/gen-deps index 0be4077..c637375 100755 --- a/commands/gen-deps +++ b/commands/gen-deps @@ -6,6 +6,7 @@ my $arch=`dpkg-architecture -qDEB_HOST_ARCH`; chomp $arch; +my $defconfigdir = ($ENV{KW_DEFCONFIG_DIR} || '/usr/share/kernel-wedge'); my $configdir = ($ENV{KW_CONFIG_DIR} || '.'); my $flavour=$ARGV[0]; @@ -49,6 +50,6 @@ sub read_package_list close LIST; } -read_package_list("/usr/share/kernel-wedge/package-list"); +read_package_list("$defconfigdir/package-list"); read_package_list("$configdir/package-list"); print sort @out; diff --git a/commands/preprocess b/commands/preprocess index e8c5ace..36ed7f7 100755 --- a/commands/preprocess +++ b/commands/preprocess @@ -1,7 +1,9 @@ #!/usr/bin/perl use strict; use warnings; -my $sysdir="/usr/share/kernel-wedge/modules/"; + +my $defconfigdir = ($ENV{KW_DEFCONFIG_DIR} || '/usr/share/kernel-wedge'); +my $sysdir="$defconfigdir/modules/"; my %modules; my %loaded; --- END --- Ben. -- Ben Hutchings Tomorrow will be cancelled due to lack of interest.
Attachment:
signature.asc
Description: This is a digitally signed message part