Bug 1288567 - Pass topsrcdir into create_context_tar; r=dustin

Relying on global variables like GECKO is a bit dangerous. To facilitate
testing of archive generation in subsequent commits, let's pass an
path into this function.

The argument is currently unused.

MozReview-Commit-ID: Et1UYraflDP

--HG--
extra : rebase_source : 012095bc2450c72467f3f65f71bcb4cf6efcde66
This commit is contained in:
Gregory Szorc 2016-07-22 10:32:58 -07:00
Родитель 6cf855965e
Коммит e44882ed6d
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -143,7 +143,7 @@ class DockerImageTask(base.Task):
if not os.path.exists(os.path.dirname(destination)):
os.makedirs(os.path.dirname(destination))
return create_context_tar(context_dir, destination, image_name)
return create_context_tar(GECKO, context_dir, destination, image_name)
@classmethod
def from_json(cls, task_dict):

Просмотреть файл

@ -60,7 +60,7 @@ def generate_context_hash(image_path):
return context_hash.hexdigest()
def create_context_tar(context_dir, out_path, prefix):
def create_context_tar(topsrcdir, context_dir, out_path, prefix):
"""Create a context tarball.
A directory ``context_dir`` containing a Dockerfile will be assembled into