comparison treepkg/sbuilder.py @ 461:454967511f5c

commit compress all logs patch from Sascha Teichmann
author Bjoern Ricks <bricks@intevation.de>
date Mon, 30 Aug 2010 13:32:31 +0000
parents fee68f1a35e8
children 058856954e2d
comparison
equal deleted inserted replaced
460:10d4cbffcc07 461:454967511f5c
137 if binary_dir is not None: 137 if binary_dir is not None:
138 for filename in os.listdir(binary_dir): 138 for filename in os.listdir(binary_dir):
139 if os.path.splitext(filename)[1] not in (".deb", ".changes"): 139 if os.path.splitext(filename)[1] not in (".deb", ".changes"):
140 os.remove(os.path.join(binary_dir, filename)) 140 os.remove(os.path.join(binary_dir, filename))
141 finally: 141 finally:
142 # compress logfile 142 # compress logfiles
143 if logfile is not None and os.path.exists(logfile): 143 util.compress_all_logs(logfile)
144 run.call(cmdexpand("gzip -9 $logfile", logfile=logfile))
145 # remove all mounted directories 144 # remove all mounted directories
146 self.umount_all() 145 self.umount_all()
147 146
148 def run_script(self, script, logfile, bindmounts=(), save_after_exec=False): 147 def run_script(self, script, logfile, bindmounts=(), save_after_exec=False):
149 """Execute a script in builder's chroot environment 148 """Execute a script in builder's chroot environment
183 logging.debug("sbdmock cmd: %s" % cmd) 182 logging.debug("sbdmock cmd: %s" % cmd)
184 183
185 try: 184 try:
186 run.call(cmd, suppress_output=False) 185 run.call(cmd, suppress_output=False)
187 finally: 186 finally:
187 if logfile is not None:
188 logdir = os.path.dirname(logfile)
188 self.umount_all() 189 self.umount_all()
189 190
190 def login(self, bindmounts=(), save_after_login=False): 191 def login(self, bindmounts=(), save_after_login=False):
191 """Start an interactive shell in the builder environment""" 192 """Start an interactive shell in the builder environment"""
192 args = [] 193 args = []
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)