summaryrefslogtreecommitdiffstats
path: root/scripts/cp-noerror
diff options
context:
space:
mode:
authorLeonardo Augusto <leobsd@gmail.com>2019-02-08 08:35:12 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 22:27:40 +0000
commit11e09611df3dcd4968ea7d84cf2929ac33ebdf26 (patch)
treef946e0cb466c75407d8f1c207cc2f96739f2c07f /scripts/cp-noerror
parent422710e0db921616a05cffc85be28e128e7188fa (diff)
downloadpoky-11e09611df3dcd4968ea7d84cf2929ac33ebdf26.tar.gz
scripts/lib/wic/engine: Fix cp's target path for ext* filesystems
Python subprocess' shell=True defaults to /bin/sh[1][2], which often refers to a POSIX-compliant shell. As the -e flag is not defined in the POSIX standard[3], some shells may interpret "-e" as the first argument to the echo command, causing the rest of the command line to fail. In this particular case, "echo -e 'cd {}'" is interpreted as "-e cd {}", which causes the first line of the command to fail, and causing cp to always place the source file in the filesystem's root. Replacing "echo -e" for a printf command makes this more portable. This issue only affects "wic cp" for ext* filesystems. [1] https://docs.python.org/2/library/subprocess.html [2] https://docs.python.org/3/library/subprocess.html [3] http://pubs.opengroup.org/onlinepubs/9699919799 (From OE-Core rev: 9a5b703d4e60c3ccdf80b5289b8e6fc91133fcde) (From OE-Core rev: bf51d6da725a3d5850c3cbd70fb91b91c08e507f) Signed-off-by: Leonardo Augusto <leobsd@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/cp-noerror')
0 files changed, 0 insertions, 0 deletions