* [gentoo-commits] gentoo commit in src/patchsets/coreutils/8.10: 020_all_coreutils-8.10-git-version-gen.patch README.history
@ 2011-02-19 21:48 Mike Frysinger (vapier)
0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2011-02-19 21:48 UTC (permalink / raw
To: gentoo-commits
vapier 11/02/19 21:48:40
Modified: README.history
Added: 020_all_coreutils-8.10-git-version-gen.patch
Log:
add patch from upstream for git-version-gen tweaks #355045
Revision Changes Path
1.2 src/patchsets/coreutils/8.10/README.history
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/coreutils/8.10/README.history?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/coreutils/8.10/README.history?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/coreutils/8.10/README.history?r1=1.1&r2=1.2
Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/coreutils/8.10/README.history,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.history 5 Feb 2011 18:52:38 -0000 1.1
+++ README.history 19 Feb 2011 21:48:40 -0000 1.2
@@ -1,3 +1,6 @@
+2 19.02.2011
+ + 020_all_coreutils-8.10-git-version-gen.patch
+
1 05.02.2011
+ 003_all_coreutils-gentoo-uname.patch
+ 010_all_coreutils-tests.patch
1.1 src/patchsets/coreutils/8.10/020_all_coreutils-8.10-git-version-gen.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/coreutils/8.10/020_all_coreutils-8.10-git-version-gen.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/coreutils/8.10/020_all_coreutils-8.10-git-version-gen.patch?rev=1.1&content-type=text/plain
Index: 020_all_coreutils-8.10-git-version-gen.patch
===================================================================
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
@@ -1,6 +1,6 @@
#!/bin/sh
# Print a version string.
-scriptversion=2011-01-04.17; # UTC
+scriptversion=2011-02-19.19; # UTC
# Copyright (C) 2007-2011 Free Software Foundation, Inc.
#
@@ -80,6 +80,7 @@ nl='
# Avoid meddling by environment variable of the same name.
v=
+v_from_git=
# First see if there is a tarball-only version file.
# then try "git describe", then default.
@@ -134,24 +135,30 @@ then
# 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
fi
v=`echo "$v" |sed 's/^v//'`
-# Don't declare a version "dirty" merely because a time stamp has changed.
-git update-index --refresh > /dev/null 2>&1
+# Test whether to append the "-dirty" suffix only if the version
+# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
+# or if it came from .tarball-version.
+if test -n "$v_from_git"; then
+ # Don't declare a version "dirty" merely because a time stamp has changed.
+ git update-index --refresh > /dev/null 2>&1
-dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
-case "$dirty" in
- '') ;;
- *) # Append the suffix only if there isn't one already.
- case $v in
- *-dirty) ;;
- *) v="$v-dirty" ;;
- esac ;;
-esac
+ dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
+ case "$dirty" in
+ '') ;;
+ *) # Append the suffix only if there isn't one already.
+ case $v in
+ *-dirty) ;;
+ *) v="$v-dirty" ;;
+ esac ;;
+ esac
+fi
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
echo "$v" | tr -d "$nl"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-19 21:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-19 21:48 [gentoo-commits] gentoo commit in src/patchsets/coreutils/8.10: 020_all_coreutils-8.10-git-version-gen.patch README.history Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox