[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 02/21] docker: add --include-file argument to
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v2 02/21] docker: add --include-file argument to 'build' command |
Date: |
Tue, 9 May 2017 12:01:15 +0800 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, 05/08 19:17, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> tests/docker/Makefile.include | 3 ++-
> tests/docker/docker.py | 5 +++++
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 03eda37bf4..c99ce702ea 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -51,7 +51,8 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
> $(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \
> $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
> $(if $(NOUSER),,--add-current-user) \
> - $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\
> + $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE))\
> + $(if $(EXTRA_FILE),--include-file=$(EXTRA_FILE)),\
> "BUILD","$*")
>
> # Enforce dependancies for composite images
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index 6ddc6e4c2a..90520e4bca 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -237,6 +237,9 @@ class BuildCommand(SubCommand):
> help="""Specify a binary that will be copied to
> the
> container together with all its dependent
> libraries""")
> + parser.add_argument("--include-file", "-f",
> + help="""Specify a file that will be copied to the
> + container""")
Is it more useful if it's '--include-files' that accepts multiple files? Or
alternatively allow this option to be use multiple times:
-f foo -f bar -f ...
Similarly, should EXTRA_FILE be EXTRA_FILES or something?
We are already lacking this with --include-executable's documentation, but
please also document "where" is it copied to in the container's filesystem.
Fam
> parser.add_argument("--add-current-user", "-u", dest="user",
> action="store_true",
> help="Add the current user to image's passwd")
> @@ -274,6 +277,8 @@ class BuildCommand(SubCommand):
> if args.include_executable:
> _copy_binary_with_libs(args.include_executable,
> docker_dir)
> + if args.include_file:
> + _copy_with_mkdir(args.include_file, docker_dir)
>
> argv += ["--build-arg=" + k.lower() + "=" + v
> for k, v in os.environ.iteritems()
> --
> 2.11.0
>
- [Qemu-devel] [PATCH v2 00/21] docker/shippable: cross-build mipsel and powerpc targets, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH v2 01/21] docker: let _copy_with_mkdir() sub_path argument be optional, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH v2 03/21] docker: add 'apt-fake' script which generate fake debian packages, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH v2 04/21] docker: install ca-certificates package in base image, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH v2 05/21] docker: compact debian base, Philippe Mathieu-Daudé, 2017/05/08