diff mbox

[1/2] vala: do not append a -dirty suffix to the valac version number

Message ID 1337170229-29684-1-git-send-email-spdawson@gmail.com
State Superseded
Headers show

Commit Message

Simon Dawson May 16, 2012, 12:10 p.m. UTC
From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/vala/vala-fix-dirty-version-suffix.patch |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 package/vala/vala-fix-dirty-version-suffix.patch

Comments

Peter Korsgaard May 18, 2012, 8:44 a.m. UTC | #1
>>>>> "spdawson" == spdawson  <spdawson@gmail.com> writes:

 spdawson> From: Simon Dawson <spdawson@gmail.com>
 spdawson> Signed-off-by: Simon Dawson <spdawson@gmail.com>
 spdawson> ---
 spdawson>  package/vala/vala-fix-dirty-version-suffix.patch |   15 +++++++++++++++
 spdawson>  1 file changed, 15 insertions(+)
 spdawson>  create mode 100644 package/vala/vala-fix-dirty-version-suffix.patch

 spdawson> diff --git a/package/vala/vala-fix-dirty-version-suffix.patch b/package/vala/vala-fix-dirty-version-suffix.patch
 spdawson> new file mode 100644
 spdawson> index 0000000..4b0044d
 spdawson> --- /dev/null
 spdawson> +++ b/package/vala/vala-fix-dirty-version-suffix.patch
 spdawson> @@ -0,0 +1,15 @@
 spdawson> +Do not append a -dirty suffix to the valac version number. The presence of
 spdawson> +the suffix can caused problems for packages (e.g. midori) which check the
 spdawson> +valac version number during configuration.

Why is this needed? We don't apply any patches to vala, and I don't see
any "-dirty" suffix in valac --version:

./output/host/usr/bin/valac --version
Vala 0.15.2
Simon Dawson May 18, 2012, 1:06 p.m. UTC | #2
> Why is this needed? We don't apply any patches to vala, and I don't see
> any "-dirty" suffix in valac --version:
>
> ./output/host/usr/bin/valac --version
> Vala 0.15.2

It may be because the Buildroot checkout in which you are testing has
no uncommitted changes. The valac build process calls

$ git diff-index --name-only HEAD 2>/dev/null

and appends the -dirty version suffix if anything is returned. In my
case --- with uncommitted changes to my Buildroot Git checkout --- the
-dirty suffix does get applied. Consequently, for me:

$ ./output/host/usr/bin/valac --version
Vala 0.15.2-dirty

In essence, I think the patch is necessary in order to prevent the
valac build process from falling foul of uncommitted changes in the
local Buildroot checkout. Of course, if you've got uncommitted changes
in the repository in which you're testing, then my theory goes out of
the window...

Simon.
Peter Korsgaard May 18, 2012, 2:57 p.m. UTC | #3
>>>>> "Simon" == Simon Dawson <spdawson@gmail.com> writes:

Hi,

 Simon> In essence, I think the patch is necessary in order to prevent the
 Simon> valac build process from falling foul of uncommitted changes in the
 Simon> local Buildroot checkout. Of course, if you've got uncommitted changes
 Simon> in the repository in which you're testing, then my theory goes out of
 Simon> the window...

Ahh, ok. That was not clear to me from your commit message. We have
something similar for autoconf
(autoconf-2.65-dont-add-dirty-to-version.patch). Care to adjust patch
description and commit message and resend?
diff mbox

Patch

diff --git a/package/vala/vala-fix-dirty-version-suffix.patch b/package/vala/vala-fix-dirty-version-suffix.patch
new file mode 100644
index 0000000..4b0044d
--- /dev/null
+++ b/package/vala/vala-fix-dirty-version-suffix.patch
@@ -0,0 +1,15 @@ 
+Do not append a -dirty suffix to the valac version number. The presence of
+the suffix can caused problems for packages (e.g. midori) which check the
+valac version number during configuration.
+
+diff -Nur a/build-aux/git-version-gen b/build-aux/git-version-gen
+--- a/build-aux/git-version-gen	2010-08-15 12:49:03.000000000 +0100
++++ b/build-aux/git-version-gen	2012-05-14 10:17:19.977204570 +0100
+@@ -135,7 +135,6 @@
+     *) # Append the suffix only if there isn't one already.
+ 	case $v in
+ 	  *-dirty) ;;
+-	  *) v="$v-dirty" ;;
+ 	esac ;;
+ esac
+