fixy
This commit is contained in:
+15
-12
@@ -1,27 +1,30 @@
|
|||||||
--- build.py 2006-08-10 15:13:09.000000000 +0300
|
--- build.py 2006-08-11 12:12:31.000000000 +0300
|
||||||
+++ boxbuild.py 2006-08-10 15:13:05.000000000 +0300
|
+++ boxbuild.py 2006-08-11 12:12:27.000000000 +0300
|
||||||
@@ -197,13 +197,27 @@
|
@@ -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()
|
- self.run_setup_action()
|
||||||
- self.run_build_action()
|
- self.run_build_action()
|
||||||
- self.run_install_action()
|
- self.run_install_action()
|
||||||
+ import catbox
|
+ if True:
|
||||||
+ ret = catbox.run(
|
+ import catbox
|
||||||
+ self.sandboxed,
|
+ ret = catbox.run(
|
||||||
+ ["/var/tmp/pisi", "/tmp", "/dev/tty", "/dev/null"],
|
+ self.sandboxed,
|
||||||
+ logger = self.sandbox_logger
|
+ ["/var/tmp/pisi", "/tmp", "/dev/tty", "/dev/null"],
|
||||||
+ )
|
+ logger = self.sandbox_logger
|
||||||
+ if ret != 0:
|
+ )
|
||||||
+ raise Error, "actions.py borked"
|
+ if ret != 0:
|
||||||
|
+ raise Error, "actions.py borked"
|
||||||
|
+ else:
|
||||||
|
+ 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 to '%s'" % data)
|
+ ctx.ui.error("Access denied: %s('%s')" % (data[0], data[1]))
|
||||||
+
|
+
|
||||||
+ def sandboxed(self):
|
+ def sandboxed(self):
|
||||||
+ self.run_setup_action()
|
+ self.run_setup_action()
|
||||||
|
|||||||
Reference in New Issue
Block a user