[PATCH v2] build-sys: fix git version from -version

marcandre.lureau@redhat.com posted 1 patch 3 years, 6 months ago
Test docker-quick@centos7 passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200929143654.518157-1-marcandre.lureau@redhat.com
scripts/qemu-version.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] build-sys: fix git version from -version
Posted by marcandre.lureau@redhat.com 3 years, 6 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Typo introduced with the script.

Fixes: 2c273f32d3 ("meson: generate qemu-version.h")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 scripts/qemu-version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh
index 03128c56a2..3f6e7e6d41 100755
--- a/scripts/qemu-version.sh
+++ b/scripts/qemu-version.sh
@@ -9,7 +9,7 @@ version="$3"
 if [ -z "$pkgversion" ]; then
     cd "$dir"
     if [ -e .git ]; then
-        pkgversion=$(git describe --match 'v*' --dirty | echo "")
+        pkgversion=$(git describe --match 'v*' --dirty) || :
     fi
 fi
 
-- 
2.26.2


Re: [PATCH v2] build-sys: fix git version from -version
Posted by 罗勇刚 (Yonggang Luo) 3 years, 6 months ago
On Tue, Sep 29, 2020 at 10:38 PM <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Typo introduced with the script.
>
> Fixes: 2c273f32d3 ("meson: generate qemu-version.h")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  scripts/qemu-version.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh
> index 03128c56a2..3f6e7e6d41 100755
> --- a/scripts/qemu-version.sh
> +++ b/scripts/qemu-version.sh
> @@ -9,7 +9,7 @@ version="$3"
>  if [ -z "$pkgversion" ]; then
>      cd "$dir"
>      if [ -e .git ]; then
> -        pkgversion=$(git describe --match 'v*' --dirty | echo "")
> +        pkgversion=$(git describe --match 'v*' --dirty) || :
>      fi
>  fi
>
> --
> 2.26.2
>
>
Maybe this script can convert to python? as we are converting to
meson+python,
for less care about different bash/zsh/xsh differences?

--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
Re: [PATCH v2] build-sys: fix git version from -version
Posted by Marc-André Lureau 3 years, 6 months ago
On Tue, Sep 29, 2020 at 6:43 PM 罗勇刚(Yonggang Luo) <luoyonggang@gmail.com>
wrote:

>
>
> On Tue, Sep 29, 2020 at 10:38 PM <marcandre.lureau@redhat.com> wrote:
> >
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Typo introduced with the script.
> >
> > Fixes: 2c273f32d3 ("meson: generate qemu-version.h")
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  scripts/qemu-version.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh
> > index 03128c56a2..3f6e7e6d41 100755
> > --- a/scripts/qemu-version.sh
> > +++ b/scripts/qemu-version.sh
> > @@ -9,7 +9,7 @@ version="$3"
> >  if [ -z "$pkgversion" ]; then
> >      cd "$dir"
> >      if [ -e .git ]; then
> > -        pkgversion=$(git describe --match 'v*' --dirty | echo "")
> > +        pkgversion=$(git describe --match 'v*' --dirty) || :
> >      fi
> >  fi
> >
> > --
> > 2.26.2
> >
> >
> Maybe this script can convert to python? as we are converting to
> meson+python,
> for less care about different bash/zsh/xsh differences?
>

You are welcome to do it :)
thanks


> --
>          此致
> 礼
> 罗勇刚
> Yours
>     sincerely,
> Yonggang Luo
>


-- 
Marc-André Lureau
Re: [PATCH v2] build-sys: fix git version from -version
Posted by 罗勇刚 (Yonggang Luo) 3 years, 6 months ago
On Tue, Sep 29, 2020 at 11:33 PM Marc-André Lureau <
marcandre.lureau@gmail.com> wrote:
>
>
>
> On Tue, Sep 29, 2020 at 6:43 PM 罗勇刚(Yonggang Luo) <luoyonggang@gmail.com>
wrote:
>>
>>
>>
>> On Tue, Sep 29, 2020 at 10:38 PM <marcandre.lureau@redhat.com> wrote:
>> >
>> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >
>> > Typo introduced with the script.
>> >
>> > Fixes: 2c273f32d3 ("meson: generate qemu-version.h")
>> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> > ---
>> >  scripts/qemu-version.sh | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh
>> > index 03128c56a2..3f6e7e6d41 100755
>> > --- a/scripts/qemu-version.sh
>> > +++ b/scripts/qemu-version.sh
>> > @@ -9,7 +9,7 @@ version="$3"
>> >  if [ -z "$pkgversion" ]; then
>> >      cd "$dir"
>> >      if [ -e .git ]; then
>> > -        pkgversion=$(git describe --match 'v*' --dirty | echo "")
>> > +        pkgversion=$(git describe --match 'v*' --dirty) || :
>> >      fi
>> >  fi
>> >
>> > --
>> > 2.26.2
>> >
>> >
>> Maybe this script can convert to python? as we are converting to
meson+python,
>> for less care about different bash/zsh/xsh differences?
>
>
> You are welcome to do it :)
> thanks
No problem. I've done one before.
>
>>
>> --
>>          此致
>> 礼
>> 罗勇刚
>> Yours
>>     sincerely,
>> Yonggang Luo
>
>
>
> --
> Marc-André Lureau



--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
Re: [PATCH v2] build-sys: fix git version from -version
Posted by Eric Blake 3 years, 6 months ago
On 9/29/20 9:36 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Typo introduced with the script.
> 
> Fixes: 2c273f32d3 ("meson: generate qemu-version.h")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  scripts/qemu-version.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

> diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh
> index 03128c56a2..3f6e7e6d41 100755
> --- a/scripts/qemu-version.sh
> +++ b/scripts/qemu-version.sh
> @@ -9,7 +9,7 @@ version="$3"
>  if [ -z "$pkgversion" ]; then
>      cd "$dir"
>      if [ -e .git ]; then
> -        pkgversion=$(git describe --match 'v*' --dirty | echo "")
> +        pkgversion=$(git describe --match 'v*' --dirty) || :
>      fi
>  fi
>  
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Re: [PATCH v2] build-sys: fix git version from -version
Posted by Laszlo Ersek 3 years, 6 months ago
On 09/29/20 16:36, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Typo introduced with the script.
> 
> Fixes: 2c273f32d3 ("meson: generate qemu-version.h")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  scripts/qemu-version.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh
> index 03128c56a2..3f6e7e6d41 100755
> --- a/scripts/qemu-version.sh
> +++ b/scripts/qemu-version.sh
> @@ -9,7 +9,7 @@ version="$3"
>  if [ -z "$pkgversion" ]; then
>      cd "$dir"
>      if [ -e .git ]; then
> -        pkgversion=$(git describe --match 'v*' --dirty | echo "")
> +        pkgversion=$(git describe --match 'v*' --dirty) || :
>      fi
>  fi
>  
> 

Reported-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo