cookbook/container/default.sha256.do: use explicit close_fds=False.

Some people have /usr/bin/python as a link to python3. The script is
designed to work in either python2 or python3, but python3's subprocess
model defaults to close_fds=True, which closes the jobserver fds and
causes an error.  Explicitly force close_fds=False to get identical
behaviour on python2 and python3.

Reported-by: Tharre <tharre3@gmail.com>
This commit is contained in:
Avery Pennarun 2019-05-15 15:17:29 -07:00
commit 2e4d3d518e
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ import hashlib, os, subprocess, sys
subprocess.check_call([
'redo-ifchange',
sys.argv[2],
])
], close_fds=False)
h = hashlib.sha256()
f = open(sys.argv[2])

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
"""Generate a docker 1.0-style manifest for a docker image."""
import json, os, subprocess, sys, time
import json, os, sys, time
j = json.load(open('template.json'))
layerid = open(sys.argv[1] + '.list.sha256').read().strip()