summaryrefslogtreecommitdiffstats
path: root/pkgs/build-support/docker
diff options
context:
space:
mode:
authorUtku Demir <me@utdemir.com>2020-06-21 12:14:52 +1200
committerUtku Demir <me@utdemir.com>2020-06-21 12:35:39 +1200
commit87a538e149cbf41361afda3b417eac1632f00c5b (patch)
tree81ea63ef9b8f5d0b20464b7a3b9e741559d14ed3 /pkgs/build-support/docker
parent4bff5b7f3d2bfd1705a10ee7f85d2494ac7bac9f (diff)
stream_layered_image: Use more descriptive variable name
Diffstat (limited to 'pkgs/build-support/docker')
-rw-r--r--pkgs/build-support/docker/stream_layered_image.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/build-support/docker/stream_layered_image.py b/pkgs/build-support/docker/stream_layered_image.py
index d7267b25672d..bbad5f5023c4 100644
--- a/pkgs/build-support/docker/stream_layered_image.py
+++ b/pkgs/build-support/docker/stream_layered_image.py
@@ -160,9 +160,9 @@ def add_layer_dir(tar, paths, mtime, add_nix=True, filter=None):
(checksum, size) = extract_checksum.extract()
path = f"{checksum}/layer.tar"
- ti = tarfile.TarInfo(path)
- ti.size = size
- ti.mtime = mtime
+ layer_tarinfo = tarfile.TarInfo(path)
+ layer_tarinfo.size = size
+ layer_tarinfo.mtime = mtime
# Then actually stream the contents to the outer tarball.
read_fd, write_fd = os.pipe()
@@ -184,7 +184,7 @@ def add_layer_dir(tar, paths, mtime, add_nix=True, filter=None):
# exception handler, and the 'addfile' call will fail since it
# won't be able to read required amount of bytes.
threading.Thread(target=producer).start()
- tar.addfile(ti, read)
+ tar.addfile(layer_tarinfo, read)
return LayerInfo(size=size, checksum=checksum, path=path, paths=paths)