]> git.pld-linux.org Git - projects/pld-builder.new.git/commitdiff
- added ability to set the builder user name in builder.conf
authorradek <radek@pld-linux.org>
Sun, 22 Jun 2003 14:34:51 +0000 (14:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    PLD_Builder/chroot.py -> 1.6
    PLD_Builder/config.py -> 1.16

PLD_Builder/chroot.py
PLD_Builder/config.py

index 25f5a003505199b4f66503f00e7fb36911eb8a2e..e0c14fe557b366282bdbc34e212e7b95b34226d7 100644 (file)
@@ -5,7 +5,9 @@ from config import config
 def quote(cmd):
   return re.sub("([\"\\\\$`])", r"\\\1", cmd)
   
-def command(cmd, user = "builder"):
+def command(cmd, user = None):
+  if user == None:
+    user = config.builder_user
   return "sudo chroot %s su - %s -c \"export LC_ALL=C; %s\"" % (config.chroot, user, quote(cmd))
   
 def command_sh(cmd):
index e4887204264217a7e4064ab175a1ffa78e085a70..fc767fc94e78a6b5645e81877b46b24028381513 100644 (file)
@@ -80,6 +80,7 @@ class Builder_Conf:
     self.job_slots = int(get("job_slots"))
     self.max_load = float(get("max_load"))
     self.control_url = get("control_url")
+    self.builder_user = get("builder_user", "builder")
     
     f = get("syslog", "")
     if f != "":
This page took 0.023648 seconds and 4 git commands to generate.