1 |
vapier 11/02/22 02:48:32 |
2 |
|
3 |
Added: m4-1.4.15-git-version-gen.patch |
4 |
Log: |
5 |
Add patch from upstream for sandbox/git misbehavior #355045 by Kyle Milz. |
6 |
|
7 |
(Portage version: 2.2.0_alpha24/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-devel/m4/files/m4-1.4.15-git-version-gen.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/m4/files/m4-1.4.15-git-version-gen.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/m4/files/m4-1.4.15-git-version-gen.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: m4-1.4.15-git-version-gen.patch |
16 |
=================================================================== |
17 |
http://bugs.gentoo.org/355045 |
18 |
|
19 |
[PATCH] git-version-gen: skip "-dirty" check when appropriate |
20 |
|
21 |
* build-aux/git-version-gen: Don't run any git commands |
22 |
when the version comes from .tarball-version. Prior to this, |
23 |
we would run git update-index --refresh even from a just-unpacked |
24 |
tarball directory, and that could affect a .git/ directory in a |
25 |
parent of the build directory. Reported by Mike Frysinger. |
26 |
|
27 |
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen |
28 |
index 68c7d64..686f703 100755 |
29 |
--- a/build-aux/git-version-gen |
30 |
+++ b/build-aux/git-version-gen |
31 |
@@ -124,13 +124,16 @@ |
32 |
# Change the first '-' to a '.', so version-comparing tools work properly. |
33 |
# Remove the "g" in git describe's output string, to save a byte. |
34 |
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; |
35 |
+ v_from_git=1 |
36 |
else |
37 |
v=UNKNOWN |
38 |
+ v_from_git= |
39 |
fi |
40 |
|
41 |
v=`echo "$v" |sed 's/^v//'` |
42 |
|
43 |
# Don't declare a version "dirty" merely because a time stamp has changed. |
44 |
+if test -n "$v_from_git"; then |
45 |
git update-index --refresh > /dev/null 2>&1 |
46 |
|
47 |
dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= |
48 |
@@ -142,6 +145,7 @@ |
49 |
*) v="$v-dirty" ;; |
50 |
esac ;; |
51 |
esac |
52 |
+fi |
53 |
|
54 |
# Omit the trailing newline, so that m4_esyscmd can use the result directly. |
55 |
echo "$v" | tr -d "$nl" |