updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / emc2 / jepler-modsilent.patch
blob9dc77c6f27caa8118ff7abbeefaaf8518f10cecb
1 From ee2683a3caa06ab4271030957d1cd572af5fea4f Mon Sep 17 00:00:00 2001
2 From: Jeff Epler <jepler@unpythonic.net>
3 Date: Tue, 19 Oct 2010 15:42:32 -0500
4 Subject: [PATCH] use correct python for modsilent
6 ---
7 src/Makefile | 2 +-
8 src/modsilent | 43 -------------------------------------------
9 src/modsilent.py | 43 +++++++++++++++++++++++++++++++++++++++++++
10 3 files changed, 44 insertions(+), 44 deletions(-)
11 delete mode 100755 src/modsilent
12 create mode 100644 src/modsilent.py
14 diff --git a/src/Makefile b/src/Makefile
15 index 5c9d2e1..43bcbcc 100644
16 --- a/src/Makefile
17 +++ b/src/Makefile
18 @@ -339,7 +339,7 @@ ifeq ($(BUILD_SYS),kbuild)
20 # '-o $(KERNELDIR)/Module.symvers' silences warnings about that file being missing
21 modules:
22 - ./modsilent $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` CC=$(CC) V=0 -o $(KERNELDIR)/Module.symvers modules
23 + $(PYTHON) modsilent.py $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` CC=$(CC) V=0 -o $(KERNELDIR)/Module.symvers modules
24 -cp *$(MODULE_EXT) ../rtlib/
25 endif
27 diff --git a/src/modsilent b/src/modsilent
28 deleted file mode 100755
29 index 7b8211f..0000000
30 --- a/src/modsilent
31 +++ /dev/null
32 @@ -1,43 +0,0 @@
33 -#!/usr/bin/python
35 -import re
36 -import sys
38 -try:
39 - import subprocess
40 -except ImportError:
41 - # Older Python versions don't have the subprocess module. In this case, we
42 - # don't filter the warnings.
43 - import os
44 - os.execvp(sys.argv[1], sys.argv[1:])
46 -undefined_warning = re.compile('WARNING: "(.*?)" \[.*?\] undefined!')
47 -duplicate_warning = re.compile("WARNING: [^ ]*: '(.*?)' exported twice. Previous.*")
49 -actually_defined = ['sin', 'cos', 'acos', 'atan2', 'fabs', 'ceil', 'pow',
50 - 'rt_task_wait_period', 'rt_sem_wait', 'rt_sem_delete',
51 - 'rt_task_init_cpuid', 'rt_set_periodic_mode', 'count2nano',
52 - 'rt_task_resume', 'rt_release_irq', 'rtf_create', 'rt_sem_init',
53 - 'rt_request_irq', 'rt_free_timer', 'rt_sem_wait_if',
54 - 'rt_linux_use_fpu', 'rt_get_cpu_time_ns', 'rt_sem_signal',
55 - 'rtf_destroy', 'rt_shm_alloc', 'rt_shm_free', 'rt_startup_irq',
56 - 'stop_rt_timer', 'rtf_put', 'rt_whoami', 'rt_task_suspend',
57 - 'rt_task_delete', 'rt_printk', 'start_rt_timer', 'rtf_get',
58 - 'rt_task_make_periodic', 'rt_shutdown_irq', 'rt_get_time',
59 - 'nano2count']
61 -permitted_duplicates = ['kinematicsType', 'kinematicsForward',
62 - 'kinematicsInverse']
64 -kbuild = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE)
65 -for line in kbuild.stderr:
66 - #print undefined_warning.match(line), duplicate_warning.match(line), repr(line)[:60]
67 - m = undefined_warning.match(line)
68 - if m and m.group(1) in actually_defined: continue
70 - m = duplicate_warning.match(line)
71 - if m and m.group(1) in permitted_duplicates: continue
73 - sys.stderr.write(line)
75 -raise SystemExit, kbuild.wait()
76 diff --git a/src/modsilent.py b/src/modsilent.py
77 new file mode 100644
78 index 0000000..7b8211f
79 --- /dev/null
80 +++ b/src/modsilent.py
81 @@ -0,0 +1,43 @@
82 +#!/usr/bin/python
84 +import re
85 +import sys
87 +try:
88 + import subprocess
89 +except ImportError:
90 + # Older Python versions don't have the subprocess module. In this case, we
91 + # don't filter the warnings.
92 + import os
93 + os.execvp(sys.argv[1], sys.argv[1:])
95 +undefined_warning = re.compile('WARNING: "(.*?)" \[.*?\] undefined!')
96 +duplicate_warning = re.compile("WARNING: [^ ]*: '(.*?)' exported twice. Previous.*")
98 +actually_defined = ['sin', 'cos', 'acos', 'atan2', 'fabs', 'ceil', 'pow',
99 + 'rt_task_wait_period', 'rt_sem_wait', 'rt_sem_delete',
100 + 'rt_task_init_cpuid', 'rt_set_periodic_mode', 'count2nano',
101 + 'rt_task_resume', 'rt_release_irq', 'rtf_create', 'rt_sem_init',
102 + 'rt_request_irq', 'rt_free_timer', 'rt_sem_wait_if',
103 + 'rt_linux_use_fpu', 'rt_get_cpu_time_ns', 'rt_sem_signal',
104 + 'rtf_destroy', 'rt_shm_alloc', 'rt_shm_free', 'rt_startup_irq',
105 + 'stop_rt_timer', 'rtf_put', 'rt_whoami', 'rt_task_suspend',
106 + 'rt_task_delete', 'rt_printk', 'start_rt_timer', 'rtf_get',
107 + 'rt_task_make_periodic', 'rt_shutdown_irq', 'rt_get_time',
108 + 'nano2count']
110 +permitted_duplicates = ['kinematicsType', 'kinematicsForward',
111 + 'kinematicsInverse']
113 +kbuild = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE)
114 +for line in kbuild.stderr:
115 + #print undefined_warning.match(line), duplicate_warning.match(line), repr(line)[:60]
116 + m = undefined_warning.match(line)
117 + if m and m.group(1) in actually_defined: continue
119 + m = duplicate_warning.match(line)
120 + if m and m.group(1) in permitted_duplicates: continue
122 + sys.stderr.write(line)
124 +raise SystemExit, kbuild.wait()
126 1.7.0.4