Closed Bug 955992 Opened 11 years ago Closed 11 years ago

Running install-gaia.js on node.js

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set
normal

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 +++
No longer blocks: 955989, 955990
Assignee: nobody → gduan
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.
attachment 8359910 [details] has implemented Promise pattern in order to run command line synchronously.
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)
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)
Comment on attachment 8359910 [details] PR to master Hi Yuren, patch is updated. Please kindly check again.
Attachment #8359910 - Flags: review?(yurenju.mozilla)
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.
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)
Comment on attachment 8359910 [details] PR to master Hi Yuren, I have updated, please kindly check again. thanks.
Attachment #8359910 - Flags: review?(yurenju.mozilla)
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.
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+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Blocks: 965327
Blocks: 955988
No longer depends on: 955988
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: