All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel.bbclass: fixed dependency calculation with recent modutils
@ 2010-03-16 11:55 Enrico Scholz
  2010-03-22  9:22 ` Roman Khimov
  0 siblings, 1 reply; 2+ messages in thread
From: Enrico Scholz @ 2010-03-16 11:55 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Enrico Scholz

'depmod' from  recent module-init-tools (version 3.9 or later) returns
paths relative to /lib/modules/`uname -r`.  E.g. 'modules.dep' contain

| kernel/fs/nfs_common/nfs_acl.ko: kernel/net/sunrpc/sunrpc.ko

instead of absolute pathnames.

The dependency calculation of kernel modules depends on absolutes paths
which are readded by this patch.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 classes/kernel.bbclass |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 69ab422..29a7e64 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -381,6 +381,17 @@ python populate_packages_prepend () {
 					deps[m2.group(1)].extend(m4.group(1).split())
 			line = f.readline()
 		f.close()
+
+		# Modern modutils do not add the "/lib/modules/`uname -r`"
+		# path to the module dependencies anymore. To keep backward
+		# compatibility, re-add them here
+		add_moddir = (lambda x:
+			      ("/lib/modules/%s/%s" % (kernelver_stripped, x),
+			       x)[x[0] == '/'])
+		deps = dict(map(lambda (key,val):
+				(add_moddir(key),
+				 map(lambda x: add_moddir(x), val)),
+				deps.items()))
 		return deps
 	
 	def get_dependencies(file, pattern, format):
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kernel.bbclass: fixed dependency calculation with recent modutils
  2010-03-16 11:55 [PATCH] kernel.bbclass: fixed dependency calculation with recent modutils Enrico Scholz
@ 2010-03-22  9:22 ` Roman Khimov
  0 siblings, 0 replies; 2+ messages in thread
From: Roman Khimov @ 2010-03-22  9:22 UTC (permalink / raw)
  To: openembedded-devel

В сообщении от Вторник 16 марта 2010 14:55:21 автор Enrico Scholz написал:
> 'depmod' from  recent module-init-tools (version 3.9 or later) returns
> paths relative to /lib/modules/`uname -r`.  E.g. 'modules.dep' contain
> 
> | kernel/fs/nfs_common/nfs_acl.ko: kernel/net/sunrpc/sunrpc.ko
> 
> instead of absolute pathnames.

I guess we need newer module-init-tools in OE to test it properly.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-22  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-16 11:55 [PATCH] kernel.bbclass: fixed dependency calculation with recent modutils Enrico Scholz
2010-03-22  9:22 ` Roman Khimov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.