On Fri, Aug 25, 2023 at 07:55:15PM +0200, Erik Skultety wrote:
> This helper function does not correspond to a particular GitLab job, it
> just logically separates the necessary step of creating a dist tarball
> from the RPM build job that takes over.
> One notable change here is the need to update git's file index which
> causes issues in local container executions which rely on a shallow
> copy of the libvirt repo created as:
>
> $ git clone --local
>
> Even if all changes have been committed, git often complained
> otherwise. Updating the index in a GitLab environment is a NOP.
>
> Signed-off-by: Erik Skultety <eskultet@redhat.com>
> ---
> ci/build.sh | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/ci/build.sh b/ci/build.sh
> index c2f54707ce..c56e45f51f 100644
> --- a/ci/build.sh
> +++ b/ci/build.sh
> @@ -54,3 +54,15 @@ run_build() {
> run_meson_setup
> run_cmd "$CMD"
> }
> +
> +run_dist() {
> + local CMD="meson dist -C build --no-tests"
> +
> + run_meson_setup
Same comment as prev patch about conditionally invoking this
> +
> + # dist is unhappy in local container environment complaining about
> + # uncommitted changes in the repo which is often not the case - refreshing
> + # git's index solves the problem
> + git update-index --refresh
This is all very peculiar but I concur, this does appear to "solve" it
for our needs.
> + run_cmd "$CMD"
> +}
> --
> 2.41.0
>
With 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 :|