changeset 138:1bcdc8934b27

In PBuilder.run_script create the log file before starting pbuilder to make sure the file is owned by the user running treepkg and not by root.
author Bernhard Herzog <bh@intevation.de>
date Mon, 02 Jun 2008 14:55:34 +0000
parents 93fcd0b9e82c
children a7fa22320c3f
files treepkg/builder.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/builder.py	Tue May 27 18:07:37 2008 +0000
+++ b/treepkg/builder.py	Mon Jun 02 14:55:34 2008 +0000
@@ -106,6 +106,11 @@
         args = []
         if logfile:
             args.extend(["--logfile", logfile])
+            # create the logfile.  This makes sure that it is owned by
+            # the user the tree packager is running as and not root, as
+            # would be the case when it is created indirectly by
+            # pbuilder
+            open(logfile, "w").close()
         for mount in bindmounts:
             args.extend(["--bindmounts", mount])
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)