From 1f16ca9fba325f5ddbb1edad5bbad78d990de5e0 Mon Sep 17 00:00:00 2001 From: Valentin Popa Date: Mon, 17 Mar 2014 17:53:38 +0200 Subject: bitbake: hob: sync after image deploy Showing "Deploy image successful" after 'dd' returns may determine the user to disconnect the usb stick even though the writing operations are not finished. This patch makes sure that the entire image is deployed on the usb stick before the user is informed about any result. [YOCTO #5892] (Bitbake rev: cc98b19112ab875ebc7cb604cd96acadac4cbf21) Signed-off-by: Valentin Popa Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py b/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py index f64fbd6ea4..a13fff906a 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py +++ b/bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py @@ -167,7 +167,7 @@ class DeployImageDialog (CrumbsDialog): if cmdline: tmpfile = tempfile.NamedTemporaryFile() cmdline += "\"sudo dd if=" + self.image_path + \ - " of=" + combo_item + "; echo $? > " + tmpfile.name + "\"" + " of=" + combo_item + " && sync; echo $? > " + tmpfile.name + "\"" subprocess.call(shlex.split(cmdline)) if int(tmpfile.readline().strip()) == 0: -- cgit v1.2.3-54-g00ecf