mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
aur/python2-rtslib: added patch file
This commit is contained in:
parent
799962d8b9
commit
341d81566d
1 changed files with 31 additions and 0 deletions
31
aur/python2-rtslib/gz-modules-upstream.patch
Normal file
31
aur/python2-rtslib/gz-modules-upstream.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
commit ee65af95e71018c1727825752b31ec55f608e323
|
||||
Author: Jerome Martin <jxm@risingtidesystems.com>
|
||||
Date: Tue Nov 1 11:39:16 2011 +0100
|
||||
|
||||
Added gzipped kernel fabric modules support.
|
||||
|
||||
* Now looks for any module name no matter what the file extension is, i.e.
|
||||
*.ko.gz not just *.ko on the filesystem.
|
||||
* Reported by Arch Linux user "Johannes Dewender" <arch@jonnyjd.net>
|
||||
|
||||
diff --git a/rtslib/utils.py b/rtslib/utils.py
|
||||
index 17156fb..5c778f5 100644
|
||||
--- a/rtslib/utils.py
|
||||
+++ b/rtslib/utils.py
|
||||
@@ -604,8 +604,14 @@ def list_available_kernel_modules():
|
||||
'''
|
||||
kver = os.uname()[2]
|
||||
depfile = "/lib/modules/%s/modules.dep" % kver
|
||||
- return [module.split(".")[0] for module in
|
||||
- re.findall(r"[a-zA-Z0-9_-]+\.ko:", fread(depfile))]
|
||||
+ handle = open(depfile)
|
||||
+ try:
|
||||
+ lines = handle.readlines()
|
||||
+ finally:
|
||||
+ handle.close()
|
||||
+
|
||||
+ return [os.path.basename(line.partition(":")[0]).partition(".")[0]
|
||||
+ for line in lines]
|
||||
|
||||
def list_loaded_kernel_modules():
|
||||
'''
|
Loading…
Reference in a new issue