summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorValentin Popa <valentin.popa@intel.com>2014-03-17 17:53:38 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-17 15:57:35 +0000
commit1f16ca9fba325f5ddbb1edad5bbad78d990de5e0 (patch)
tree7595d8f38fa8e0fa98d47a47b694680eb58659dd /bitbake
parent92155fde2079251739f455bca599a52cd21ef12b (diff)
downloadpoky-1f16ca9fba325f5ddbb1edad5bbad78d990de5e0.tar.gz
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 <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig/deployimagedialog.py2
1 files changed, 1 insertions, 1 deletions
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):
167 if cmdline: 167 if cmdline:
168 tmpfile = tempfile.NamedTemporaryFile() 168 tmpfile = tempfile.NamedTemporaryFile()
169 cmdline += "\"sudo dd if=" + self.image_path + \ 169 cmdline += "\"sudo dd if=" + self.image_path + \
170 " of=" + combo_item + "; echo $? > " + tmpfile.name + "\"" 170 " of=" + combo_item + " && sync; echo $? > " + tmpfile.name + "\""
171 subprocess.call(shlex.split(cmdline)) 171 subprocess.call(shlex.split(cmdline))
172 172
173 if int(tmpfile.readline().strip()) == 0: 173 if int(tmpfile.readline().strip()) == 0: