+ td = tempfile.mkdtemp()
+
+ def cleanup():
+ try: shutil.rmtree(td)
+ except FileNotFoundError: pass
+
+ cleanups.append(cleanup)
+
+ ssp = SourceShipmentPreparer(td)
+ ssp.logger = partial(log_debug, DBG.OWNSOURCE)
+ if DBG.OWNSOURCE in debug_set: ssp.stream_debug = sys.stdout
+ ssp.download_packages = opts.ownsource >= 2
+ if opts.ownsource >= 1: ssp.generate()
+
+ for ix in (0,1):
+ bn = ssp.output_names[ix]
+ op = ssp.output_paths[ix]
+ if op is None: continue
+ resource.hippotat_sources[ix] = bn
+ subresource =twisted.web.static.File(op)
+ resource.putChild(bn.encode('utf-8'), subresource)
+
+ reactor.callLater(0.1, (lambda: log.info('hippotatd started', dflag=False)))
+