# HG changeset patch # User Bernhard Herzog # Date 1175539611 -7200 # Node ID 2802be4101567db527a37701bc233dc465067a8d # Parent 6ced445aa0904ea1dccfb7ab164734a9b6135952 add config options pbuilderrc and use it when calling pbuilder diff -r 6ced445aa090 -r 2802be410156 demo.cfg --- a/demo.cfg Mon Mar 12 15:24:18 2007 +0100 +++ b/demo.cfg Mon Apr 02 20:46:51 2007 +0200 @@ -23,6 +23,14 @@ # specific values root_cmd: sudo +# The pbuilder config file to use. It should be an absolute filename. +# The script initpbuilder.py can create it and the rest of the pbuilder +# files and directories. You can override this in the pkg_ sections for +# individual packagers if necessaary. You will have to adapt pbuilder +# yourself, then, though. +pbuilderrc: %(treepkg_dir)s/pbuilder/pbuilderrc + + # Email address and name to use as the packager in the debian packages. # You can override this in the pkg_ sections if you need package # specific values diff -r 6ced445aa090 -r 2802be410156 treepkg/packager.py --- a/treepkg/packager.py Mon Mar 12 15:24:18 2007 +0100 +++ b/treepkg/packager.py Mon Apr 02 20:46:51 2007 +0200 @@ -185,7 +185,9 @@ self.status.status = "creating_binary_package" util.ensure_directory(self.binary_dir) logging.info("Building binary package; loging to %r", self.logfile) - cmd = ["/usr/sbin/pbuilder", "build", "--logfile", self.logfile, + cmd = ["/usr/sbin/pbuilder", "build", + "--configfile", self.pkg_line.pbuilderrc, + "--logfile", self.logfile, "--buildresult", self.binary_dir, self.dsc_file] run.call(self.pkg_line.root_cmd + cmd, suppress_output=True) self.status.status = "binary_package_created" @@ -249,12 +251,13 @@ extra_config_desc = [] - def __init__(self, name, base_dir, svn_url, root_cmd, deb_email, + def __init__(self, name, base_dir, svn_url, root_cmd, pbuilderrc, deb_email, deb_fullname, packager_class="treepkg.packager"): self.name = name self.base_dir = base_dir self.svn_url = svn_url self.root_cmd = root_cmd + self.pbuilderrc = pbuilderrc self.deb_email = deb_email self.deb_fullname = deb_fullname self.pkg_dir_template = "%(revision)d-%(increment)d" diff -r 6ced445aa090 -r 2802be410156 treepkg/readconfig.py --- a/treepkg/readconfig.py Mon Mar 12 15:24:18 2007 +0100 +++ b/treepkg/readconfig.py Mon Apr 02 20:46:51 2007 +0200 @@ -17,7 +17,7 @@ packager_desc = [ "name", "base_dir", "svn_url", "packager_class", - ("root_cmd", shlex.split), + ("root_cmd", shlex.split), "pbuilderrc", "deb_email", "deb_fullname", ]