]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: deploy-target: Let script continue even if rm fails
authorDaniel Lublin <daniel@lublin.se>
Tue, 30 May 2017 11:17:59 +0000 (13:17 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Jun 2017 22:43:28 +0000 (23:43 +0100)
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.

Signed-off-by: Daniel Lublin <daniel@lublin.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/devtool/deploy.py

index d181135a9d204a5446a58b4c8b28c841422f2531..04c34cb0167889613c1a12798139cd154186310d 100644 (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: