devtool: deploy-target: Let script continue even if rm fails

The remote script is run with `set -e`, so doing rm without -f on a
$file that is already gone will exit the whole script, failing any
redeployment. Assume a use case where packages sometimes produces
certain test binaries stored on volatile media (tmpfs), and where the
system is occasionally rebooted.

(From OE-Core rev: db54c9a22a9b66c673df8e836de5e47fc9edda0b)

Signed-off-by: Daniel Lublin <daniel@lublin.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Daniel Lublin 2017-05-30 13:17:59 +02:00 committed by Richard Purdie
parent 1deb4a00ba
commit 693878a3e9

View File

@ -64,7 +64,7 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
lines.append(' rmdir $file > /dev/null 2>&1 || true')
lines.append(' fi')
lines.append(' else')
lines.append(' rm $file')
lines.append(' rm -f $file')
lines.append(' fi')
lines.append(' done')
if not dryrun: