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
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
18 @@ -339,7 +339,7 @@ ifeq ($(BUILD_SYS),kbuild)
20 # '-o $(KERNELDIR)/Module.symvers' silences warnings about that file being missing
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/
27 diff --git a/src/modsilent b/src/modsilent
28 deleted file mode 100755
29 index 7b8211f..0000000
41 - # Older Python versions don't have the subprocess module. In this case, we
42 - # don't filter the warnings.
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',
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
78 index 0000000..7b8211f
80 +++ b/src/modsilent.py
90 + # Older Python versions don't have the subprocess module. In this case, we
91 + # don't filter the warnings.
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',
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()