backports: always use absolute path to output directory, less probability of pycocci...
authorJacob Siverskog <jacob@teenageengineering.com>
Tue, 19 Aug 2014 14:26:12 +0000 (16:26 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 6 Sep 2014 19:49:34 +0000 (21:49 +0200)
While running gentree.py I got error messages such as 'Failed to
process SmPL patch
collateral-evolutions/generic/0001-group-attr/0001-group_attr_class.cocci',
due to incorrect path handling. This patch always makes gentree always
call pycocci with the absolute path to the output directory.

Signed-off-by: Jacob Siverskog <jacob@teenageengineering.com>
gentree.py

index 5fe699650916c57ab2745da9503736f6061af512..9b4db98ea4a380a6417920d52d4601bf59ec2731 100755 (executable)
@@ -725,7 +725,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
         extra_spatch_args = []
         if args.profile_cocci:
             cmd.append('--profile-cocci')
-        cmd.append(args.outdir)
+        cmd.append(os.path.abspath(args.outdir))
         print_name = cocci_file[prefix_len:]
         if args.verbose:
             logwrite("Applying SmPL patch %s" % print_name)