Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Unified Diff: src/platform/dev/devserver.py

Issue 661447: First version of the new devserver client (Closed)
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/dev/devserver.py
diff --git a/src/platform/dev/devserver.py b/src/platform/dev/devserver.py
index 67db0ff88ee879f84b2af0c57ad9c443f0b6f921..ad6ece69b033a8a8d1718bc2f6c66f62dc2b1ad0 100644
--- a/src/platform/dev/devserver.py
+++ b/src/platform/dev/devserver.py
@@ -3,7 +3,6 @@
# found in the LICENSE file.
import autoupdate
-import buildutil
import os
import web
import sys
@@ -27,26 +26,18 @@ class update:
def POST(self):
return updater.HandleUpdatePing(web.data())
-class webbuild:
- """
- builds the package specified by the pkg parameter. Then redirects to index
- """
- def GET(self):
- input = web.input()
- web.debug("called %s " % input.pkg)
- output = buildbot.BuildPackage(input.pkg)
- web.debug("copied %s to static" % output)
- raise web.seeother('/')
-
class build:
"""
builds the package specified by the pkg parameter and returns the name
of the output file.
"""
- def GET(self):
+ def POST(self):
input = web.input()
- web.debug("called %s " % input.pkg)
- return buildbot.BuildPackage(input.pkg)
+ web.debug("emerging %s " % input.pkg)
+ emerge_command = "emerge-%s %s" % (input.board, input.pkg)
+ err = os.system(emerge_command)
+ if err != 0:
+ raise Exception("failed to execute %s" % emerge_command)
if __name__ == "__main__":
@@ -57,7 +48,6 @@ if __name__ == "__main__":
os.system("mkdir -p %s" % static_dir)
updater = autoupdate.Autoupdate(root_dir=root_dir, static_dir=static_dir)
- buildbot = buildutil.BuildUtil(root_dir=root_dir, static_dir=static_dir)
urls = ('/', 'index',
'/update', 'update',
« no previous file with comments | « src/platform/dev/buildutil.py ('k') | src/platform/dev/gmerge » ('j') | src/platform/dev/gmerge » ('J')

Powered by Google App Engine
This is Rietveld 408576698