[OE-core] [PATCH] devtool: deploy-target: Let script continue even if rm fails
Paul Eggleton
paul.eggleton at linux.intel.com
Tue May 30 21:44:51 UTC 2017
On Tuesday, 30 May 2017 11:17:59 PM NZST Daniel Lublin wrote:
> 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 at lublin.se>
> ---
> scripts/lib/devtool/deploy.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
> index b3730ae833..cdc7db0b29 100644
> --- a/scripts/lib/devtool/deploy.py
> +++ b/scripts/lib/devtool/deploy.py
> @@ -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:
>
Acked-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list