diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-02-22 02:48:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-02-22 02:48:32 +0000 |
commit | 394e6d2b34708fff740ee49b496d544a86fa4312 (patch) | |
tree | 79af5897f6fc21289c653c20ad15c1c7c8d704ab /sys-devel/m4/files | |
parent | old (diff) | |
download | gentoo-2-394e6d2b34708fff740ee49b496d544a86fa4312.tar.gz gentoo-2-394e6d2b34708fff740ee49b496d544a86fa4312.tar.bz2 gentoo-2-394e6d2b34708fff740ee49b496d544a86fa4312.zip |
Add patch from upstream for sandbox/git misbehavior #355045 by Kyle Milz.
(Portage version: 2.2.0_alpha24/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel/m4/files')
-rw-r--r-- | sys-devel/m4/files/m4-1.4.15-git-version-gen.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-devel/m4/files/m4-1.4.15-git-version-gen.patch b/sys-devel/m4/files/m4-1.4.15-git-version-gen.patch new file mode 100644 index 000000000000..32f85d4bdf54 --- /dev/null +++ b/sys-devel/m4/files/m4-1.4.15-git-version-gen.patch @@ -0,0 +1,39 @@ +http://bugs.gentoo.org/355045 + +[PATCH] git-version-gen: skip "-dirty" check when appropriate + +* build-aux/git-version-gen: Don't run any git commands +when the version comes from .tarball-version. Prior to this, +we would run git update-index --refresh even from a just-unpacked +tarball directory, and that could affect a .git/ directory in a +parent of the build directory. Reported by Mike Frysinger. + +diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen +index 68c7d64..686f703 100755 +--- a/build-aux/git-version-gen ++++ b/build-aux/git-version-gen +@@ -124,13 +124,16 @@ + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; ++ v_from_git=1 + else + v=UNKNOWN ++ v_from_git= + fi + + v=`echo "$v" |sed 's/^v//'` + + # Don't declare a version "dirty" merely because a time stamp has changed. ++if test -n "$v_from_git"; then + git update-index --refresh > /dev/null 2>&1 + + dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= +@@ -142,6 +145,7 @@ + *) v="$v-dirty" ;; + esac ;; + esac ++fi + + # Omit the trailing newline, so that m4_esyscmd can use the result directly. + echo "$v" | tr -d "$nl" |