changeset 47:2802be410156

add config options pbuilderrc and use it when calling pbuilder
author Bernhard Herzog <bh@intevation.de>
date Mon, 02 Apr 2007 20:46:51 +0200
parents 6ced445aa090
children aed3869ac04a
files demo.cfg treepkg/packager.py treepkg/readconfig.py
diffstat 3 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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"
--- 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",
     ]
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)