aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/collectd/collectd/collectd-version.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/collectd/collectd/collectd-version.patch')
-rw-r--r--meta-oe/recipes-extended/collectd/collectd/collectd-version.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/collectd/collectd/collectd-version.patch b/meta-oe/recipes-extended/collectd/collectd/collectd-version.patch
new file mode 100644
index 0000000000..1e2b7c159c
--- /dev/null
+++ b/meta-oe/recipes-extended/collectd/collectd/collectd-version.patch
@@ -0,0 +1,31 @@
+Don't pick up version string from parent git repository
+
+If the collectd source is extracted from a tarball underneath a
+directory structure that includes another git repository, that
+repository will be picked up by "git describe" which is not
+desirable. Check whether collectd itself is a git repository and just
+use the default version if not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/version-gen.sh b/version-gen.sh
+index e344541..d1c0929 100755
+--- a/version-gen.sh
++++ b/version-gen.sh
+@@ -2,7 +2,10 @@
+
+ DEFAULT_VERSION="5.2.2.git"
+
+-VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"
++VERSION=""
++if test -d .git ; then
++ VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"
++fi
+
+ if test -z "$VERSION"; then
+ VERSION="$DEFAULT_VERSION"
+--
+1.7.10.4
+