]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 30 Jan 2021 10:38:49 +0000 (10:38 +0000)
commit482589e2cc7c3ddeefb0a0fb98d97a9cbb18c9ec
tree66aa57d35bf156aab9d36477a29d69c4d92a3a69
parent5dfd5ad5144708b474ef31eaa89a846c57be8ac0
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.

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/patch.py