Re: [libvirt PATCH v2 07/35] ci: build.sh: Add a helper function to create the dist tarball

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 11, 2023 at 03:43:08PM +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@xxxxxxxxxx>
> Erik Skultety <eskultet@xxxxxxxxxx>:
> ---
>  ci/build.sh | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/ci/build.sh b/ci/build.sh
> index f908bbc5d4..ab56c5e5eb 100644
> --- a/ci/build.sh
> +++ b/ci/build.sh
> @@ -42,3 +42,13 @@ run_build() {
>      test -d $GIT_ROOT/build/build.ninja || run_meson_setup
>      run_cmd meson compile -C build $BUILD_ARGS
>  }
> +
> +run_dist() {
> +    test -d $GIT_ROOT/build/build.ninja || run_meson_setup

test -f


> +
> +    # 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
> +    run_cmd meson dist -C build --no-tests
> +}

With the test fix

Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>


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 :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux