From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: jsnow@redhat.com
Subject: [PATCH 1/9] python: mkvenv: tweak the matching of --diagnose to depspecs
Date: Wed, 9 Aug 2023 11:29:25 +0200 [thread overview]
Message-ID: <20230809092933.761524-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20230809092933.761524-1-pbonzini@redhat.com>
Move the matching between the "absent" array and dep_specs[0] inside
the loop, preparing for the possibility of having multiple canaries
among the installed packages.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
python/scripts/mkvenv.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py
index a47f1eaf5d6..399659b22f1 100644
--- a/python/scripts/mkvenv.py
+++ b/python/scripts/mkvenv.py
@@ -806,6 +806,7 @@ def _do_ensure(
"""
absent = []
present = []
+ canary = None
for spec in dep_specs:
matcher = distlib.version.LegacyMatcher(spec)
ver = _get_version(matcher.name)
@@ -817,6 +818,8 @@ def _do_ensure(
or not matcher.match(distlib.version.LegacyVersion(ver))
):
absent.append(spec)
+ if spec == dep_specs[0]:
+ canary = prog
else:
logger.info("found %s %s", matcher.name, ver)
present.append(matcher.name)
@@ -839,7 +842,7 @@ def _do_ensure(
absent[0],
online,
wheels_dir,
- prog if absent[0] == dep_specs[0] else None,
+ canary,
)
return None
--
2.41.0
next prev parent reply other threads:[~2023-08-09 9:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 9:29 [PATCH 0/9] Use known good releases when installing in pyvenv Paolo Bonzini
2023-08-09 9:29 ` Paolo Bonzini [this message]
2023-08-09 9:29 ` [PATCH 2/9] python: mkvenv: introduce TOML-like representation of dependencies Paolo Bonzini
2023-08-09 9:29 ` [PATCH 3/9] python: mkvenv: add ensuregroup command Paolo Bonzini
2023-08-09 9:29 ` [PATCH 4/9] lcitool: bump libvirt-ci submodule and regenerate Paolo Bonzini
2023-08-09 9:29 ` [PATCH 5/9] configure: never use PyPI for Meson Paolo Bonzini
2023-08-09 9:29 ` [PATCH 6/9] python: use vendored tomli Paolo Bonzini
2023-08-09 9:29 ` [PATCH 7/9] configure: switch to ensuregroup Paolo Bonzini
2023-08-09 9:29 ` [PATCH 8/9] Revert "tests: Use separate virtual environment for avocado" Paolo Bonzini
2023-08-09 9:29 ` [PATCH 9/9] tests/docker: add python3-tomli dependency to containers Paolo Bonzini
2023-08-10 0:40 ` [PATCH 0/9] Use known good releases when installing in pyvenv John Snow
2023-08-10 11:52 ` Philippe Mathieu-Daudé
2023-08-10 11:56 ` Paolo Bonzini
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=20230809092933.761524-2-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=jsnow@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 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).