[PATCH RFC 03/10] python/mkvenv: create timestamp file for each group "ensured"

John Snow posted 10 patches 2 weeks, 2 days ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
[PATCH RFC 03/10] python/mkvenv: create timestamp file for each group "ensured"
Posted by John Snow 2 weeks, 2 days ago
Signed-off-by: John Snow <jsnow@redhat.com>
---
 python/scripts/mkvenv.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py
index a064709e6ce..a22e3ee3394 100644
--- a/python/scripts/mkvenv.py
+++ b/python/scripts/mkvenv.py
@@ -838,6 +838,12 @@ def ensure_group(
             raise Ouch(result[0])
         raise SystemExit(f"\n{result[0]}\n\n")
 
+    if inside_a_venv():
+        for group in groups:
+            path = Path(sys.prefix).joinpath(f"{group}.group")
+            with open(path, "w", encoding="UTF8"):
+                pass
+
 
 def post_venv_setup() -> None:
     """
-- 
2.51.0
Re: [PATCH RFC 03/10] python/mkvenv: create timestamp file for each group "ensured"
Posted by Thomas Huth 2 weeks, 1 day ago
Missing patch description - what is this good for?

  Thomas

On 28/10/2025 23.03, John Snow wrote:
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   python/scripts/mkvenv.py | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py
> index a064709e6ce..a22e3ee3394 100644
> --- a/python/scripts/mkvenv.py
> +++ b/python/scripts/mkvenv.py
> @@ -838,6 +838,12 @@ def ensure_group(
>               raise Ouch(result[0])
>           raise SystemExit(f"\n{result[0]}\n\n")
>   
> +    if inside_a_venv():
> +        for group in groups:
> +            path = Path(sys.prefix).joinpath(f"{group}.group")
> +            with open(path, "w", encoding="UTF8"):
> +                pass
> +
>   
>   def post_venv_setup() -> None:
>       """
Re: [PATCH RFC 03/10] python/mkvenv: create timestamp file for each group "ensured"
Posted by John Snow 2 weeks, 1 day ago
On Thu, Oct 30, 2025, 4:28 AM Thomas Huth <thuth@redhat.com> wrote:

>
> Missing patch description - what is this good for?
>

At the moment, truthfully, nothing!

The intent was a timestamp file for each group so scripts don't need to
reinstall groups post-config time.

Basically a replacement for check-venv's timestamp file.



>   Thomas
>
> On 28/10/2025 23.03, John Snow wrote:
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >   python/scripts/mkvenv.py | 6 ++++++
> >   1 file changed, 6 insertions(+)
> >
> > diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py
> > index a064709e6ce..a22e3ee3394 100644
> > --- a/python/scripts/mkvenv.py
> > +++ b/python/scripts/mkvenv.py
> > @@ -838,6 +838,12 @@ def ensure_group(
> >               raise Ouch(result[0])
> >           raise SystemExit(f"\n{result[0]}\n\n")
> >
> > +    if inside_a_venv():
> > +        for group in groups:
> > +            path = Path(sys.prefix).joinpath(f"{group}.group")
> > +            with open(path, "w", encoding="UTF8"):
> > +                pass
> > +
> >
> >   def post_venv_setup() -> None:
> >       """
>
>