From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Fam Zheng" <fam@euphon.net>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: use of 'apt' in scripting in our dockerfiles provokes warnings
Date: Wed, 30 Sep 2020 11:46:24 +0100 [thread overview]
Message-ID: <20200930104624.GE2264779@redhat.com> (raw)
In-Reply-To: <CAFEAcA-wMzZhO-9EdYhPC3aoPatQ-JEtBJ2nSjGepRbLs-5AdA@mail.gmail.com>
On Wed, Sep 30, 2020 at 11:33:21AM +0100, Peter Maydell wrote:
> While processing a recent pullreq which updated the dockerfile
> dependencies and thus provoked a rebuild, I noticed that we
> use the 'apt' command in ways that provoke a warning:
>
> #7 0.789 WARNING: apt does not have a stable CLI interface. Use with
> caution in scripts.
>
> The apt(8) manpage says:
>
> SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
> The apt(8) commandline is designed as an end-user tool and it may
> change behavior between versions. While it tries not to break backward
> compatibility this is not guaranteed either if a change seems
> beneficial for interactive use.
>
> All features of apt(8) are available in dedicated APT tools like apt-
> get(8) and apt-cache(8) as well. apt(8) just changes the default value
> of some options (see apt.conf(5) and specifically the Binary scope). So
> you should prefer using these commands (potentially with some
> additional options enabled) in your scripts as they keep backward
> compatibility as much as possible.
>
> That suggests that we should probably be using apt-get instead
> of apt in our dockerfiles...
It appears that we already use apt-get in some of the dockerfiles.
Yay for consistency. Should be an easy switch to standardize on
apt-get though.
>
> Also, any idea what this error is about?
>
> #4 importing cache manifest from registry.gitlab.com/qemu-project/qemu/qemu...
> #4 digest:
> sha256:815fb44b573ac7520d148d9b2510c00f31846ca6fa55127d322bc8db3c5d0ec0
> #4 name: "importing cache manifest from
> registry.gitlab.com/qemu-project/qemu/qemu/debian-alpha-cross:latest"
> #4 started: 2020-09-29 22:57:54.371490684 +0000 UTC
> #4 completed: 2020-09-29 22:57:55.064468936 +0000 UTC
> #4 duration: 692.978252ms
> #4 error: "invalid build cache from
> {MediaType:application/vnd.docker.distribution.manifest.v2+json
> Digest:sha256:a1e8a5830bb19b7cddda64872c5d71a0337d4b98bed30fd7684d20467adcd289
> Size:1161 URLs:[] Annotations:map[] Platform:<nil>}"
>
> It didn't seemt to have an adverse effect...
I've not seen that before. I guess everything still works because cache
is optional.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
prev parent reply other threads:[~2020-09-30 10:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 10:33 use of 'apt' in scripting in our dockerfiles provokes warnings Peter Maydell
2020-09-30 10:43 ` Philippe Mathieu-Daudé
2020-09-30 12:58 ` Peter Maydell
2020-09-30 10:46 ` Daniel P. Berrangé [this message]
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=20200930104624.GE2264779@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=fam@euphon.net \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.