]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: hob: sync after image deploy
authorValentin Popa <valentin.popa@intel.com>
Mon, 17 Mar 2014 15:53:38 +0000 (17:53 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Mar 2014 15:57:35 +0000 (15:57 +0000)
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 <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py

index f64fbd6ea4e859d0ded1b8f1f454c475780a3d7a..a13fff906a2895690c8746bf4b29a004d24fd921 100644 (file)
@@ -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: