diff mbox series

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

Message ID 20200929143654.518157-1-marcandre.lureau@redhat.com
State New
Headers show
Series [v2] build-sys: fix git version from -version | expand

Commit Message

Marc-André Lureau Sept. 29, 2020, 2:36 p.m. UTC
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(-)

Comments

罗勇刚(Yonggang Luo) Sept. 29, 2020, 2:42 p.m. UTC | #1
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
<div dir="ltr"><br><br>On Tue, Sep 29, 2020 at 10:38 PM &lt;<a href="mailto:marcandre.lureau@redhat.com">marcandre.lureau@redhat.com</a>&gt; wrote:<br>&gt;<br>&gt; From: Marc-André Lureau &lt;<a href="mailto:marcandre.lureau@redhat.com">marcandre.lureau@redhat.com</a>&gt;<br>&gt;<br>&gt; Typo introduced with the script.<br>&gt;<br>&gt; Fixes: 2c273f32d3 (&quot;meson: generate qemu-version.h&quot;)<br>&gt; Signed-off-by: Marc-André Lureau &lt;<a href="mailto:marcandre.lureau@redhat.com">marcandre.lureau@redhat.com</a>&gt;<br>&gt; ---<br>&gt;  scripts/qemu-version.sh | 2 +-<br>&gt;  1 file changed, 1 insertion(+), 1 deletion(-)<br>&gt;<br>&gt; diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh<br>&gt; index 03128c56a2..3f6e7e6d41 100755<br>&gt; --- a/scripts/qemu-version.sh<br>&gt; +++ b/scripts/qemu-version.sh<br>&gt; @@ -9,7 +9,7 @@ version=&quot;$3&quot;<br>&gt;  if [ -z &quot;$pkgversion&quot; ]; then<br>&gt;      cd &quot;$dir&quot;<br>&gt;      if [ -e .git ]; then<br>&gt; -        pkgversion=$(git describe --match &#39;v*&#39; --dirty | echo &quot;&quot;)<br>&gt; +        pkgversion=$(git describe --match &#39;v*&#39; --dirty) || :<br>&gt;      fi<br>&gt;  fi<br>&gt;<br>&gt; --<br>&gt; 2.26.2<br>&gt;<br>&gt;<br>Maybe this script can convert to python? as we are converting to meson+python,<div>for less care about different bash/zsh/xsh differences?<br><br>--<br>         此致<br>礼<br>罗勇刚<br>Yours<br>    sincerely,<br>Yonggang Luo</div></div>
Eric Blake Sept. 29, 2020, 2:52 p.m. UTC | #2
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
Marc-André Lureau Sept. 29, 2020, 3:33 p.m. UTC | #3
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
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 29, 2020 at 6:43 PM 罗勇刚(Yonggang Luo) &lt;<a href="mailto:luoyonggang@gmail.com">luoyonggang@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br>On Tue, Sep 29, 2020 at 10:38 PM &lt;<a href="mailto:marcandre.lureau@redhat.com" target="_blank">marcandre.lureau@redhat.com</a>&gt; wrote:<br>&gt;<br>&gt; From: Marc-André Lureau &lt;<a href="mailto:marcandre.lureau@redhat.com" target="_blank">marcandre.lureau@redhat.com</a>&gt;<br>&gt;<br>&gt; Typo introduced with the script.<br>&gt;<br>&gt; Fixes: 2c273f32d3 (&quot;meson: generate qemu-version.h&quot;)<br>&gt; Signed-off-by: Marc-André Lureau &lt;<a href="mailto:marcandre.lureau@redhat.com" target="_blank">marcandre.lureau@redhat.com</a>&gt;<br>&gt; ---<br>&gt;  scripts/qemu-version.sh | 2 +-<br>&gt;  1 file changed, 1 insertion(+), 1 deletion(-)<br>&gt;<br>&gt; diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh<br>&gt; index 03128c56a2..3f6e7e6d41 100755<br>&gt; --- a/scripts/qemu-version.sh<br>&gt; +++ b/scripts/qemu-version.sh<br>&gt; @@ -9,7 +9,7 @@ version=&quot;$3&quot;<br>&gt;  if [ -z &quot;$pkgversion&quot; ]; then<br>&gt;      cd &quot;$dir&quot;<br>&gt;      if [ -e .git ]; then<br>&gt; -        pkgversion=$(git describe --match &#39;v*&#39; --dirty | echo &quot;&quot;)<br>&gt; +        pkgversion=$(git describe --match &#39;v*&#39; --dirty) || :<br>&gt;      fi<br>&gt;  fi<br>&gt;<br>&gt; --<br>&gt; 2.26.2<br>&gt;<br>&gt;<br>Maybe this script can convert to python? as we are converting to meson+python,<div>for less care about different bash/zsh/xsh differences?<br></div></div></blockquote><div><br></div><div>You are welcome to do it :)</div><div>thanks<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br>--<br>         此致<br>礼<br>罗勇刚<br>Yours<br>    sincerely,<br>Yonggang Luo</div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Marc-André Lureau<br></div></div>
罗勇刚(Yonggang Luo) Sept. 29, 2020, 3:56 p.m. UTC | #4
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
<div dir="ltr"><br><br>On Tue, Sep 29, 2020 at 11:33 PM Marc-André Lureau &lt;<a href="mailto:marcandre.lureau@gmail.com">marcandre.lureau@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Tue, Sep 29, 2020 at 6:43 PM 罗勇刚(Yonggang Luo) &lt;<a href="mailto:luoyonggang@gmail.com">luoyonggang@gmail.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; On Tue, Sep 29, 2020 at 10:38 PM &lt;<a href="mailto:marcandre.lureau@redhat.com">marcandre.lureau@redhat.com</a>&gt; wrote:<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; From: Marc-André Lureau &lt;<a href="mailto:marcandre.lureau@redhat.com">marcandre.lureau@redhat.com</a>&gt;<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Typo introduced with the script.<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Fixes: 2c273f32d3 (&quot;meson: generate qemu-version.h&quot;)<br>&gt;&gt; &gt; Signed-off-by: Marc-André Lureau &lt;<a href="mailto:marcandre.lureau@redhat.com">marcandre.lureau@redhat.com</a>&gt;<br>&gt;&gt; &gt; ---<br>&gt;&gt; &gt;  scripts/qemu-version.sh | 2 +-<br>&gt;&gt; &gt;  1 file changed, 1 insertion(+), 1 deletion(-)<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; diff --git a/scripts/qemu-version.sh b/scripts/qemu-version.sh<br>&gt;&gt; &gt; index 03128c56a2..3f6e7e6d41 100755<br>&gt;&gt; &gt; --- a/scripts/qemu-version.sh<br>&gt;&gt; &gt; +++ b/scripts/qemu-version.sh<br>&gt;&gt; &gt; @@ -9,7 +9,7 @@ version=&quot;$3&quot;<br>&gt;&gt; &gt;  if [ -z &quot;$pkgversion&quot; ]; then<br>&gt;&gt; &gt;      cd &quot;$dir&quot;<br>&gt;&gt; &gt;      if [ -e .git ]; then<br>&gt;&gt; &gt; -        pkgversion=$(git describe --match &#39;v*&#39; --dirty | echo &quot;&quot;)<br>&gt;&gt; &gt; +        pkgversion=$(git describe --match &#39;v*&#39; --dirty) || :<br>&gt;&gt; &gt;      fi<br>&gt;&gt; &gt;  fi<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; --<br>&gt;&gt; &gt; 2.26.2<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt; Maybe this script can convert to python? as we are converting to meson+python,<br>&gt;&gt; for less care about different bash/zsh/xsh differences?<br>&gt;<br>&gt;<br>&gt; You are welcome to do it :)<br>&gt; thanks<div>No problem. I&#39;ve done one before.<br>&gt;<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt;          此致<br>&gt;&gt; 礼<br>&gt;&gt; 罗勇刚<br>&gt;&gt; Yours<br>&gt;&gt;     sincerely,<br>&gt;&gt; Yonggang Luo<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Marc-André Lureau<br><br><br><br>--<br>         此致<br>礼<br>罗勇刚<br>Yours<br>    sincerely,<br>Yonggang Luo</div></div>
Laszlo Ersek Oct. 1, 2020, 10:17 a.m. UTC | #5
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
diff mbox series

Patch

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