]> pilppa.com Git - familiar-h63xx-build.git/commitdiff
kernel.bbclass: error out if module dependency extraction fails. don't strip -hh...
authorRene Wagner <rw@handhelds.org>
Sun, 21 May 2006 13:39:04 +0000 (15:39 +0200)
committerRene Wagner <rw@handhelds.org>
Sun, 21 May 2006 13:39:04 +0000 (15:39 +0200)
Signed-off-by: Rene Wagner <rw@handhelds.org>
org.handhelds.familiar/classes/kernel.bbclass

index e4d07c1a6b0c746bf22d6468ed3435e01aaa3ca1..c1cd25174c36fc2459a9d2a6214daac0308109b3 100644 (file)
@@ -232,12 +232,13 @@ python populate_packages_prepend () {
                kernelver = bb.data.getVar('PV', d, 1) + bb.data.getVar('KERNEL_LOCALVERSION', d, 1)
                kernelver_stripped = kernelver
                m = re.match('^(.*-hh.*)[\.\+].*$', kernelver)
-               if m:
+               if m and not bb.data.getVar('KERNEL_PRESERVE_HH_MINOR_VER'):
                        kernelver_stripped = m.group(1)
                path = bb.data.getVar("PATH", d, 1)
                host_prefix = bb.data.getVar("HOST_PREFIX", d, 1) or ""
 
                cmd = "PATH=\"%s\" %sdepmod -n -a -r -b %s -F %s/boot/System.map-%s %s" % (path, host_prefix, dvar, dvar, kernelver, kernelver_stripped)
+               bb.debug (1, cmd)
                f = os.popen(cmd, 'r')
 
                deps = {}
@@ -268,7 +269,9 @@ python populate_packages_prepend () {
                                        m4 = re.match(pattern4, line)
                                        deps[m2.group(1)].extend(m4.group(1).split())
                        line = f.readline()
-               f.close()
+               if f.close() or not deps:
+                       # depmod returned an error or no deps found (very unlikely)
+                       raise bb.build.FuncFailed("Failed to extract module dependencies.")
                return deps
        
        def get_dependencies(file, pattern, format):