diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-09-08 15:53:30 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-09-08 15:54:15 +0200 |
commit | 2f3125ad030c87d6ac7dfe1581876bb93e3226a6 (patch) | |
tree | c4bd01c2c8560091368699483374d5fba744e99d /gentree.py | |
parent | 3756f63528b044d6487bac046ad2972bc21583a5 (diff) |
Revert to using pycocci
This reverts commit 3756f63528b044d6487bac046ad2972bc21583a5
and commit 709e720caa66816f32c6adc6050549fa40b9cf52 since
using built-in concurrency caused problems with --cocci-grep,
and not using that makes things slower.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'gentree.py')
-rwxr-xr-x | gentree.py | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -5,7 +5,6 @@ import argparse, sys, os, errno, shutil, re, subprocess import tarfile, gzip -from multiprocessing import cpu_count # find self source_dir = os.path.abspath(os.path.dirname(__file__)) @@ -585,17 +584,13 @@ def apply_patches(args, desc, source_dir, patch_src, target_dir, logwrite=lambda prefix_len = len(os.path.join(source_dir, patch_src)) + 1 for cocci_file in sempatches: - cmd = ['spatch', - '--sp-file', cocci_file, - '--in-place', - '--recursive-includes', - '--relax-include-path', - '--timeout', '120', - '-j', '%d' % cpu_count(), - '--dir', os.path.abspath(target_dir) ] + # Until Coccinelle picks this up + pycocci = os.path.join(source_dir, 'devel/pycocci') + cmd = [pycocci, cocci_file] extra_spatch_args = [] if args.profile_cocci: - cmd.append('--profile') + cmd.append('--profile-cocci') + cmd.append(os.path.abspath(target_dir)) print_name = cocci_file[prefix_len:] if args.verbose: logwrite("Applying SmPL patch %s" % print_name) |