qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, alex.bennee@linaro.org
Subject: [PATCH 1/8] docker.py/build: support -t and -f arguments
Date: Wed, 22 Apr 2020 13:23:44 -0400	[thread overview]
Message-ID: <20200422172351.26583-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20200422172351.26583-1-pbonzini@redhat.com>

The docker.py command line is subtly different from docker and podman's,
in that the tag and Dockerfile are passed via positional arguments.
Remove this gratuitous difference and just parse -f and -t.

-f was previously used by --extra-files, only keep the long option.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/docker/Makefile.include | 2 +-
 tests/docker/docker.py        | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 43a8678688..262704663f 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -55,7 +55,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 else
 docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 	$(call quiet-command,\
-		$(DOCKER_SCRIPT) build qemu:$* $< \
+		$(DOCKER_SCRIPT) build -t qemu:$* -f $< \
 		$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
 		$(if $(NOUSER),,--add-current-user) \
 		$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index d8268c1111..ad61747bae 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -391,16 +391,16 @@ class BuildCommand(SubCommand):
                             help="""Specify a binary that will be copied to the
                             container together with all its dependent
                             libraries""")
-        parser.add_argument("--extra-files", "-f", nargs='*',
+        parser.add_argument("--extra-files", nargs='*',
                             help="""Specify files that will be copied in the
                             Docker image, fulfilling the ADD directive from the
                             Dockerfile""")
         parser.add_argument("--add-current-user", "-u", dest="user",
                             action="store_true",
                             help="Add the current user to image's passwd")
-        parser.add_argument("tag",
+        parser.add_argument("-t", dest="tag",
                             help="Image Tag")
-        parser.add_argument("dockerfile",
+        parser.add_argument("-f", dest="dockerfile",
                             help="Dockerfile name")
 
     def run(self, args, argv):
-- 
2.18.2




  reply	other threads:[~2020-04-22 17:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 17:23 [PATCH 0/8] run-coverity-scan: misc improvements, especially for docker mode Paolo Bonzini
2020-04-22 17:23 ` Paolo Bonzini [this message]
2020-04-22 17:39   ` [PATCH 1/8] docker.py/build: support -t and -f arguments Philippe Mathieu-Daudé
2020-04-22 17:23 ` [PATCH 2/8] docker.py/build: support binary files in --extra-files Paolo Bonzini
2020-04-22 17:37   ` Philippe Mathieu-Daudé
2020-04-22 17:23 ` [PATCH 3/8] run-coverity-scan: get Coverity token and email from special git config section Paolo Bonzini
2020-04-27 12:34   ` Peter Maydell
2020-04-22 17:23 ` [PATCH 4/8] run-coverity-scan: use docker.py Paolo Bonzini
2020-04-27 12:42   ` Peter Maydell
2020-04-27 13:38     ` Paolo Bonzini
2020-04-22 17:23 ` [PATCH 5/8] run-coverity-scan: add --no-update-tools option Paolo Bonzini
2020-04-27 12:46   ` Peter Maydell
2020-04-27 13:41     ` Paolo Bonzini
2020-04-22 17:23 ` [PATCH 6/8] run-coverity-scan: use --no-update-tools in docker run Paolo Bonzini
2020-04-27 12:48   ` Peter Maydell
2020-04-22 17:23 ` [PATCH 7/8] run-coverity-scan: download tools outside the container Paolo Bonzini
2020-04-27 12:50   ` Peter Maydell
2020-04-22 17:23 ` [PATCH 8/8] run-coverity-scan: support --update-tools-only --docker Paolo Bonzini
2020-04-27 12:53   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422172351.26583-2-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).