]> code.ossystems Code Review - openembedded-core.git/commit
lib/oe/patch.py: Don't return command stderr from runcmd function
authorTomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Fri, 29 Jan 2021 11:38:08 +0000 (12:38 +0100)
committerAnuj Mittal <anuj.mittal@intel.com>
Mon, 1 Feb 2021 05:43:10 +0000 (13:43 +0800)
commit1dadeb58e88c4d953be612654fe4a76b51ff0553
tree296323f452c2af2c00e259bf8d884931db787584
parent73f8c25a44ee33866a8fa61824437285cea96249
lib/oe/patch.py: Don't return command stderr from runcmd function

If a function returns any stderr it will be passed to extractPatches and
used as path to patch.

For example subprocess command output can be:
| sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
| /tmp/oepatchhuqle8fj/0001-foo.patch
| /tmp/oepatchhuqle8fj/0002-bar.patch

that will result in:
| FileNotFoundError: [Errno 2] No such file or directory: 'sh:'

To fix this I separated output, made the function return stdout and
print stderr only in case of command error.

(From OE-Core rev: 482589e2cc7c3ddeefb0a0fb98d97a9cbb18c9ec)

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5e2450731c1f70fb72af0b8349905b359d3cd2b1)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/lib/oe/patch.py