Hello community,
here is the log from the commit of package module-init-tools
checked in at Mon Nov 17 17:23:29 CET 2008.
--------
--- module-init-tools/module-init-tools.changes 2008-11-10 14:15:29.000000000 +0100
+++ /mounts/work_src_done/STABLE/module-init-tools/module-init-tools.changes 2008-11-13 21:06:00.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Nov 13 21:05:28 CET 2008 - mmarek@suse.cz
+
+- depmod: use modules.order to sort modules.dep (bnc#441384)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
depmod-use-modules.order.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ module-init-tools.spec ++++++
--- /var/tmp/diff_new_pack.jl8061/_old 2008-11-17 17:23:00.000000000 +0100
+++ /var/tmp/diff_new_pack.jl8061/_new 2008-11-17 17:23:00.000000000 +0100
@@ -21,7 +21,7 @@
Name: module-init-tools
BuildRequires: zlib-devel
Version: 3.4
-Release: 54
+Release: 55
License: GPL v2 or later
Group: System/Kernel
# for grepping /etc/SUSE-release
@@ -59,6 +59,7 @@
Patch8: mit-zlibsupport-use-mmap.patch
Patch9: module-options-from-kernel-cmdline.patch
Patch10: depmod-abort-on-oom.patch
+Patch11: depmod-use-modules.order.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -89,6 +90,7 @@
%patch8
%patch9 -p1
%patch10
+%patch11
# don't try to regenerate the patched manpages (patch7 and patch9)
touch modprobe.conf.5 modprobe.8
@@ -167,6 +169,8 @@
/etc/modprobe.d
%changelog
+* Thu Nov 13 2008 mmarek@suse.cz
+- depmod: use modules.order to sort modules.dep (bnc#441384)
* Mon Nov 10 2008 mmarek@suse.cz
- abort depmod in out of memory condition instead of polluting
kernel and kmp build logs with hundreds of "needs unknown symbol"
++++++ depmod-use-modules.order.patch ++++++
From: Tejun Heo
Kbuild now generates and installs modules.order along with modules.
This patch updates depmod such that it sorts module list according to
the file before generating output files. Modules which aren't on
modules.order are put after modules which are ordered by
modules.order.
This makes modprobe to prioritize modules according to kernel
Makefile's just as built-in modules are link-ordered by them.
---
depmod.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
--- depmod.c.orig
+++ depmod.c
@@ -682,6 +682,54 @@ static struct module *grab_basedir(const
return list;
}
+static void sort_modules(const char *dirname, struct module **listp)
+{
+ struct module *list = *listp, *tlist = NULL, **tpos = &tlist;
+ FILE *modorder;
+ int dir_len = strlen(dirname) + 1;
+ char file_name[dir_len + strlen("modules.order") + 1];
+ char line[10240];
+
+ sprintf(file_name, "%s/%s", dirname, "modules.order");
+
+ modorder = fopen(file_name, "r");
+ if (!modorder) {
+ /* Older kernels don't generate modules.order. Just
+ return if the file doesn't exist. */
+ if (errno == ENOENT)
+ return;
+ fatal("Could not open '%s': %s\n", file_name, strerror(errno));
+ }
+
+ sprintf(line, "%s/", dirname);
+
+ /* move modules listed in modorder file to tlist in order */
+ while (fgets(line, sizeof(line), modorder)) {
+ struct module **pos, *mod;
+ int len = strlen(line);
+
+ if (line[len - 1] == '\n')
+ line[len - 1] = '\0';
+
+ for (pos = &list; (mod = *pos); pos = &(*pos)->next) {
+ if (strcmp(line, mod->pathname + dir_len) == 0) {
+ *pos = mod->next;
+ mod->next = NULL;
+ *tpos = mod;
+ tpos = &mod->next;
+ break;
+ }
+ }
+ }
+
+ /* append the rest */
+ *tpos = list;
+
+ fclose(modorder);
+
+ *listp = tlist;
+}
+
static void parse_modules(struct module *list)
{
struct module *i;
@@ -1184,6 +1232,7 @@ int main(int argc, char *argv[])
} else {
list = grab_basedir(dirname,search,overrides);
}
+ sort_modules(dirname, &list);
parse_modules(list);
for (i = 0; i < sizeof(depfiles)/sizeof(depfiles[0]); i++) {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org