devtool: un-/deploy-target: put deploylist into destdir
When deploying on devices with a RO root-filesystem, devtool would
fail on writing to the hard-coded "deploylist_path = '/.devtool'"
Since devtool already supports deploying to a different root-prefix
with: hostname[:destdir], we can make use of this guaranteed RW
location to place the deployment-list there.
Add the destdir parameter to the _prepare_remote_script function, to
construct the deploylist_path from it. For the 'undeploy' the same
host:destdir splitting logic is used as in 'deploy'.
Now it is possible to modify and build a recipe 'foo-bar' with
devtool, and have its ./image content deployed through:
$build> devtool deploy foo-bar target:/opt/development-overlay
Or removed again with:
$build> devtool undeploy foo-bar target:/opt/development-overlay
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>