summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2010-06-25 23:25:36 +0000
committerMark Linimon <linimon@FreeBSD.org>2010-06-25 23:25:36 +0000
commit2cff86f1e99f44cc01030419a01b39ba2b10e806 (patch)
tree9b579df9a9c9e15dc0f4a503d5044ad315618add /Tools
parentGeneralize the packge building scripts to be able to be run on more than (diff)
Generalize the packge building scripts to be able to be run on more than
one 'head' node, rather than just pointyhat itself. Constants are factored out into installation-specific files known as portbuild/conf/server.conf and portbuild/conf/client.conf. There is only one server.conf file. Individual <arch> directories may have their own client.conf files, or may symlink to ../conf/client.conf. Note the removal of the hard-coding of INDEX.N, where N has to be a single digit, and also have no '.' in it. Feature safe: yes
Notes
Notes: svn path=/head/; revision=256991
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/packagebuild20
1 files changed, 16 insertions, 4 deletions
diff --git a/Tools/portbuild/scripts/packagebuild b/Tools/portbuild/scripts/packagebuild
index 6664643a8d6c..654cf858f4dc 100755
--- a/Tools/portbuild/scripts/packagebuild
+++ b/Tools/portbuild/scripts/packagebuild
@@ -1,6 +1,8 @@
#!/usr/bin/env python
-# Improved build scheduler. We try to build leaf packages (those
+# Improved build dispatcher. Invoked on server-side from dopackages.
+
+# We try to build leaf packages (those
# which can be built immediately without requiring additional
# dependencies to be built) in the order such that the ones required
# by the longest dependency chains are built first.
@@ -32,7 +34,9 @@
from qmanagerclient import *
-import os, sys, threading, time, subprocess
+from freebsd_config import *
+
+import os, string, sys, threading, time, subprocess
#import random
from itertools import chain
#import gc
@@ -41,6 +45,14 @@ from stat import *
from Queue import Queue
from heapq import *
+CONFIG_DIR="/var/portbuild"
+CONFIG_SUBDIR="conf"
+CONFIG_FILENAME="server.conf"
+
+config = getConfig( CONFIG_DIR, CONFIG_SUBDIR, CONFIG_FILENAME )
+QMANAGER_PRIORITY_PACKAGES = string.split( \
+ config.get( 'QMANAGER_PRIORITY_PACKAGES' ) )
+
categories = {}
ports = {}
@@ -263,7 +275,7 @@ they still need to know about us as dependencies etc """
self.depth = max + 1
else:
self.depth = 1
- for port in ["openoffice", "kde-3"]:
+ for port in QMANAGER_PRIORITY_PACKAGES:
if self.name.startswith(port):
# Artificial boost to try and get it building earlier
self.depth = 100
@@ -482,7 +494,7 @@ def main(arch, branch, buildid, args):
basedir="/var/portbuild/"+arch+"/"+branch+"/builds/"+buildid
portsdir=basedir+"/ports"
- indexfile=portsdir+"/INDEX-"+branch[0]
+ indexfile=portsdir+"/INDEX-"+branch
print "[MASTER] parseindex..."
index = Index(indexfile)