mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809437 - Copy gecko files to /data/local prior to copying them to /system/b2g, r=jgriffin
This commit is contained in:
parent
25c007afd8
commit
0de5bee277
@ -387,28 +387,39 @@ waitFor(
|
|||||||
print 'installing gecko binaries...'
|
print 'installing gecko binaries...'
|
||||||
# need to remount so we can write to /system/b2g
|
# need to remount so we can write to /system/b2g
|
||||||
self._run_adb(['remount'])
|
self._run_adb(['remount'])
|
||||||
|
|
||||||
for root, dirs, files in os.walk(gecko_path):
|
for root, dirs, files in os.walk(gecko_path):
|
||||||
for filename in files:
|
for filename in files:
|
||||||
rel_path = os.path.relpath(os.path.join(root, filename), gecko_path)
|
rel_file = os.path.relpath(os.path.join(root, filename), gecko_path)
|
||||||
system_b2g_file = os.path.join('/system/b2g', rel_path)
|
data_local_file = os.path.join('/data/local', rel_file)
|
||||||
for retry in range(1, push_attempts+1):
|
for retry in range(1, push_attempts+1):
|
||||||
print 'pushing', system_b2g_file, '(attempt %s of %s)' % (retry, push_attempts)
|
print 'pushing', data_local_file, '(attempt %s of %s)' % (retry, push_attempts)
|
||||||
try:
|
try:
|
||||||
self.dm.pushFile(os.path.join(root, filename), system_b2g_file)
|
self.dm.pushFile(os.path.join(root, filename), data_local_file)
|
||||||
break
|
break
|
||||||
except DMError:
|
except DMError:
|
||||||
if retry == push_attempts:
|
if retry == push_attempts:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
print 'restarting B2G'
|
|
||||||
self.dm.shellCheckOutput(['stop', 'b2g'])
|
self.dm.shellCheckOutput(['stop', 'b2g'])
|
||||||
# ensure the b2g process has fully stopped (bug 809437)
|
# ensure the b2g process has fully stopped
|
||||||
for i in range(0, 10):
|
for i in range(0, 10):
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
if self.dm.processExist('b2g') is None:
|
if self.dm.processExist('b2g') is None:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
raise TimeoutException("Timeout waiting for the b2g process to terminate")
|
raise TimeoutException("Timeout waiting for the b2g process to terminate")
|
||||||
|
|
||||||
|
for root, dirs, files in os.walk(gecko_path):
|
||||||
|
for filename in files:
|
||||||
|
rel_file = os.path.relpath(os.path.join(root, filename), gecko_path)
|
||||||
|
data_local_file = os.path.join('/data/local', rel_file)
|
||||||
|
system_file = os.path.join('/system/b2g', rel_file)
|
||||||
|
print 'copying', data_local_file, 'to', system_file
|
||||||
|
self.dm.shellCheckOutput(['dd', 'if=%s' % data_local_file,
|
||||||
|
'of=%s' % system_file])
|
||||||
|
|
||||||
|
print 'restarting B2G'
|
||||||
self.dm.shellCheckOutput(['start', 'b2g'])
|
self.dm.shellCheckOutput(['start', 'b2g'])
|
||||||
|
|
||||||
if not self.wait_for_port():
|
if not self.wait_for_port():
|
||||||
|
Loading…
Reference in New Issue
Block a user