From 4e57b349826eaa13a5f6c424c14b256d73222734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= Date: Tue, 21 Jul 2009 07:27:39 +0000 Subject: [PATCH] Handle packages which are not kernel modules, install symlink in the kernel-source package. --- pisi/actionsapi/kerneltools.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pisi/actionsapi/kerneltools.py b/pisi/actionsapi/kerneltools.py index d892913c..05a397a1 100644 --- a/pisi/actionsapi/kerneltools.py +++ b/pisi/actionsapi/kerneltools.py @@ -56,8 +56,13 @@ def __getFlavour(): def __getModuleFlavour(): for fl in [_f for _f in __getAllSupportedFlavours() if "-" in _f]: - if fl.split("-")[1] == get.srcNAME().split("-")[1]: - return fl + try: + if fl.split("-")[1] == get.srcNAME().split("-")[1]: + return fl + except IndexError: + # the package is not a module, may be a userspace application + # needing the kernel sources/headers for only reference. + pass return "kernel" @@ -269,6 +274,9 @@ def installSource(): autotools.make("modules_prepare") shelltools.system("find . -path './.*' | xargs rm -rf") + # Create the symlink + pisitools.dosym("/%s" % destination, "/lib/modules/%s/source" % suffix) + def cleanModuleFiles(): """ Cleans module.* files generated by depmod """ # Remove modules.* files, they will be autogenerated during pakhandler.