]> code.ossystems Code Review - openembedded-core.git/commit
lib/oe/patch: handle encoding differences in patch files
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 6 Jul 2016 23:57:09 +0000 (11:57 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Jul 2016 22:10:05 +0000 (23:10 +0100)
commit7f4d7a6f51569954e204f110827a8ce256bcdc68
tree94554cf65548220d1070ba3aaa121a3c2adbc722
parent71350003790c38e84b0e525a71a2fe5d24e3d083
lib/oe/patch: handle encoding differences in patch files

With Python 3, the encoding of a file is significant; several recipes in
OE-Core have patches which are not fully utf-8 decodable e.g. man,
lrzsz, and gstreamer1.0-libav, leading to errors when using devtool's
modify, upgrade or extract subcommands on these recipes. To work around
this, try reading the patch file as utf-8 first and if that fails try
latin-1 before giving up.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/patch.py