diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 383: fix the sdcard mount problem for jb panda tracking and jb snowball

Message ID 20120914024211.832.91528.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Yongqin Liu Sept. 14, 2012, 2:42 a.m. UTC
Merge authors:
  Yongqin Liu (liuyq0307)
Related merge proposals:
  https://code.launchpad.net/~liuyq0307/lava-dispatcher/fix-sdcard-mount/+merge/124136
  proposed by: Yongqin Liu (liuyq0307)
  review: Approve - Yongqin Liu (liuyq0307)
------------------------------------------------------------
revno: 383 [merge]
committer: Yongqin Liu <yongqin.liu@linaro.org>
branch nick: lava-dispatcher
timestamp: Fri 2012-09-14 10:41:22 +0800
message:
  fix the sdcard mount problem for jb panda tracking and jb snowball
modified:
  lava_dispatcher/client/master.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/client/master.py'
--- lava_dispatcher/client/master.py	2012-08-28 04:56:24 +0000
+++ lava_dispatcher/client/master.py	2012-09-12 12:15:15 +0000
@@ -226,12 +226,16 @@ 
         # then the sdcard partition will be used as the userdata partition as
         # before, and so cannot be used here as the sdcard on android
         sdcard_part_lava = session._client.device_option("sdcard_part_android")
-        sed_cmd = ("/dev_mount sdcard \/mnt\/sdcard/c dev_mount sdcard "
-                   "/mnt/sdcard %s /devices/platform/omap/omap_hsmmc.0/"
-                   "mmc_host/mmc0") % sdcard_part_lava
+        sdcard_part_org = session._client.device_option(
+                                                    "sdcard_part_android_org")
+        original = 'dev_mount sdcard /mnt/sdcard %s ' % sdcard_part_org
+        replacement = 'dev_mount sdcard /mnt/sdcard %s ' % sdcard_part_lava
+        sed_cmd = "s@{original}@{replacement}@".format(original=original,
+                                                       replacement=replacement)
         session.run(
             'sed -i "%s" /mnt/lava/system/etc/vold.fstab' % sed_cmd,
             failok=True)
+        session.run("cat /mnt/lava/system/etc/vold.fstab", failok=True)
 
     script_path = '%s/%s' % ('/mnt/lava', '/system/bin/disablesuspend.sh')
     if not session.is_file_exist(script_path):