--use-catbox option

This commit is contained in:
Bahadır Kandemir
2006-08-14 06:20:13 +00:00
parent ef99bc59de
commit 1aec0d2aca
+30 -15
View File
@@ -1,13 +1,12 @@
--- build.py 2006-08-11 12:12:31.000000000 +0300 Index: build.py
+++ boxbuild.py 2006-08-11 12:12:27.000000000 +0300 ===================================================================
--- build.py (revision 8935)
+++ build.py (working copy)
@@ -197,13 +197,30 @@ @@ -197,13 +197,30 @@
# apply the patches and prepare a source directory for build. # apply the patches and prepare a source directory for build.
self.apply_patches() self.apply_patches()
- self.run_setup_action() + if ctx.get_option('use_catbox'):
- self.run_build_action()
- self.run_install_action()
+ if True:
+ import catbox + import catbox
+ ret = catbox.run( + ret = catbox.run(
+ self.sandboxed, + self.sandboxed,
@@ -18,19 +17,35 @@
+ raise Error, "actions.py borked" + raise Error, "actions.py borked"
+ else: + else:
+ self.sandboxed() + self.sandboxed()
+
# after all, we are ready to build/prepare the packages + # after all, we are ready to build/prepare the packages
return self.build_packages() + return self.build_packages()
+
+ def sandbox_logger(self, event, data): + def sandbox_logger(self, event, data):
+ if event == "denied": + if event == "denied":
+ ctx.ui.error("Access denied: %s('%s')" % (data[0], data[1])) + ctx.ui.error("Access denied to '%s'" % data)
+ +
+ def sandboxed(self): + def sandboxed(self):
+ self.run_setup_action() self.run_setup_action()
+ self.run_build_action() self.run_build_action()
+ self.run_install_action() self.run_install_action()
+
- # after all, we are ready to build/prepare the packages
- return self.build_packages()
-
def set_environment_vars(self): def set_environment_vars(self):
"""Sets the environment variables for actions API to use""" """Sets the environment variables for actions API to use"""
Index: cli/commands.py
===================================================================
--- cli/commands.py (revision 8935)
+++ cli/commands.py (working copy)
@@ -396,6 +396,8 @@
default=False, help=_("don't install build dependencies, fail if a build dependency is present"))
self.parser.add_option("-F", "--package-format", action="store", default='1.1',
help=_("pisi package format"))
+ self.parser.add_option("", "--use-catbox", action="store_true",
+ default=False, help=_("use catbox"))
def run(self):
if not self.args: