Closed
Bug 955992
Opened 11 years ago
Closed 11 years ago
Running install-gaia.js on node.js
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: yurenju, Assigned: gduan)
References
Details
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #955988 +++
Reporter | ||
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gduan
Assignee | ||
Comment 1•11 years ago
|
||
In bug 956004 , install-gaia.js is already able to run on nodejs, however, we still have some problem running on Windows.
I'll take getPid function to utils-xpc and utils-node to fix this bug.
Assignee | ||
Comment 2•11 years ago
|
||
WIP.
Assignee | ||
Comment 3•11 years ago
|
||
attachment 8359910 [details] has implemented Promise pattern in order to run command line synchronously.
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8359910 [details]
PR to master
Hi Yuren,
this patch has implemented promise pattern to replace execSync module. I've already tested in windows and mac, so I think it's ready to be reviewed.
please kindly check it.
thanks.
Attachment #8359910 -
Flags: review?(yurenju.mozilla)
Reporter | ||
Comment 5•11 years ago
|
||
Comment on attachment 8359910 [details]
PR to master
George, we should make this pull request more readable and try to avoid using shell too much, we should consider running build script on Windows without MinGW in future.
left some comments on github and please feel free to discuss with me.
Attachment #8359910 -
Flags: review?(yurenju.mozilla)
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8359910 [details]
PR to master
Hi Yuren,
patch is updated. Please kindly check again.
Attachment #8359910 -
Flags: review?(yurenju.mozilla)
Assignee | ||
Comment 7•11 years ago
|
||
In Windows, all the files inside the zip have prefix '\', so I cannot read the manifest and close app successfully, I think it's related to bug 957497, since I tried to revert it and the pb's gone.
Reporter | ||
Comment 8•11 years ago
|
||
Comment on attachment 8359910 [details]
PR to master
George, looks we can't guarantee sequence of Commander.run in utils-node is same as we called.
I added a console.log after utils-node.js:72 (after q.resolve()) and got:
> adb start-server
> adb shell stop b2g
> adb shell rm -r //cache/*
> adb shell rm -r //system/b2g/webapps
> adb shell rm //data/local/user.js
> adb push "/Users/yurenju/Documents/workspace/gaia/profile/webapps" //system/b2g/webapps
> adb push "/Users/yurenju/Documents/workspace/gaia/profile/user.js" //data/local/user.js
> adb shell start b2g
>
> done: [ adb start-server]
> done: [ adb push "/Users/yurenju/Documents/workspace/gaia/profile/user.js" //data/local/user.js]
> done: [ adb shell stop b2g]
> done: [ adb shell start b2g]
> done: [ adb shell rm //data/local/user.js]
> done: [ adb shell rm -r //cache/*]
> done: [ adb shell rm -r //system/b2g/webapps]
> done: [ adb push "/Users/yurenju/Documents/workspace/gaia/profile/webapps" //system/b2g/webapps]
please check that.
Attachment #8359910 -
Flags: review?(yurenju.mozilla)
Assignee | ||
Comment 9•11 years ago
|
||
Comment on attachment 8359910 [details]
PR to master
Hi Yuren,
I have updated, please kindly check again. thanks.
Attachment #8359910 -
Flags: review?(yurenju.mozilla)
Assignee | ||
Comment 10•11 years ago
|
||
Basically, I forgot to return defer.promise in each .run(), so, the queue will not actually stop in each then function. New patch has fix this pb.
Reporter | ||
Comment 11•11 years ago
|
||
Comment on attachment 8359910 [details]
PR to master
r=yurenju, please add more comments in install-gaia.js for reading easily.
Attachment #8359910 -
Flags: review?(yurenju.mozilla) → review+
Assignee | ||
Comment 12•11 years ago
|
||
Thanks Yuren,
merge into master
https://github.com/mozilla-b2g/gaia/commit/8b906d20082c3dfa636f0ef8b69ca9ce0b272ce2
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•