X-Git-Url: https://git.distorted.org.uk/~mdw/hippotat/blobdiff_plain/f85d143fe449d69d6f611fcd388191a80bdfc415..c295a9c09deae50d00778caeb74b79d189f5065f:/hippotatlib/ownsource.py diff --git a/hippotatlib/ownsource.py b/hippotatlib/ownsource.py index 8e30979..16ccdbd 100644 --- a/hippotatlib/ownsource.py +++ b/hippotatlib/ownsource.py @@ -40,7 +40,7 @@ except ImportError: pass class SourceShipmentPreparer(): def __init__(s, destdir): # caller may modify, and should read after calling generate() - s.output_names = ['srcbomb.tar.gz', 'fullsrcbomb.tar'] + s.output_names = ['srcbomb.tar.gz', 'srcpkgsbomb.tar'] s.output_paths = [None,None] # alternatively caller may read this # defaults, caller can modify after creation s.logger = lambda m: print('SourceShipmentPreparer',m) @@ -57,6 +57,8 @@ class SourceShipmentPreparer(): s.rune_shell = ['/bin/bash', '-ec'] s.show_pathnames = True s.download_packages = True + s.stream_stderr = sys.stderr + s.stream_debug = open('/dev/null','w') s.rune_cpio = r''' set -o pipefail ( @@ -101,10 +103,10 @@ class SourceShipmentPreparer(): return [] r = [] for l in excl: - l.strip + l = l.strip() if l.startswith('#'): next if not len(l): next - r += l + r.append(l) return r def src_likeparent_git(s, src): @@ -274,8 +276,8 @@ class SourceShipmentPreparer(): subprocess.run(cmdl, cwd=s._packages_path, stdin=subprocess.DEVNULL, - stdout=sys.stdout, - stderr=sys.stderr, + stdout=s.stream_debug, + stderr=s.stream_stderr, restore_signals=True, check=True) @@ -362,6 +364,7 @@ class SourceShipmentPreparer(): s._destdir, outputs) def mk_packages_portmanteau(s): + if not s.download_packages: return s._mk_portmanteau(1, s.rune_portmanteau_uncompressed, s._packages_path, s._package_sources)