summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilherme Amadio <amadio@gentoo.org>2016-04-01 09:54:54 -0300
committerGuilherme Amadio <amadio@gentoo.org>2016-04-01 10:09:55 -0300
commit93db43bd48d1ad8a64996e52b73838d6318207e6 (patch)
treee4e6aacfa63254ee4753477fa7b9a5720838c408 /dev-vcs/gitstats
parentwww-client/opera-beta: Old. (diff)
downloadgentoo-93db43bd48d1ad8a64996e52b73838d6318207e6.tar.gz
gentoo-93db43bd48d1ad8a64996e52b73838d6318207e6.tar.bz2
gentoo-93db43bd48d1ad8a64996e52b73838d6318207e6.zip
dev-vcs/gitstats: force text processing by grep
Fix for bug 575946 by forcing grep to process commit data as text even when invalid unicode characters appear. Reported-by: Martin Mokrejš Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-vcs/gitstats')
-rw-r--r--dev-vcs/gitstats/files/gitstats-0_pre20151223-grep-force-text.patch11
-rw-r--r--dev-vcs/gitstats/gitstats-0_pre20151223.ebuild1
2 files changed, 12 insertions, 0 deletions
diff --git a/dev-vcs/gitstats/files/gitstats-0_pre20151223-grep-force-text.patch b/dev-vcs/gitstats/files/gitstats-0_pre20151223-grep-force-text.patch
new file mode 100644
index 00000000000..9663afcd4f6
--- /dev/null
+++ b/dev-vcs/gitstats/files/gitstats-0_pre20151223-grep-force-text.patch
@@ -0,0 +1,11 @@
+--- a/gitstats 2016-04-01 09:46:31.000000000 -0300
++++ b/gitstats 2016-04-01 09:46:18.458667610 -0300
+@@ -327,7 +327,7 @@
+
+ # Collect revision statistics
+ # Outputs "<stamp> <date> <time> <timezone> <author> '<' <mail> '>'"
+- lines = getpipeoutput(['git rev-list --pretty=format:"%%at %%ai %%aN <%%aE>" %s' % getlogrange('HEAD'), 'grep -v ^commit']).split('\n')
++ lines = getpipeoutput(['git rev-list --pretty=format:"%%at %%ai %%aN <%%aE>" %s' % getlogrange('HEAD'), 'grep -av ^commit']).split('\n')
+ for line in lines:
+ parts = line.split(' ', 4)
+ author = ''
diff --git a/dev-vcs/gitstats/gitstats-0_pre20151223.ebuild b/dev-vcs/gitstats/gitstats-0_pre20151223.ebuild
index a4a6a19bd9e..451a1522a64 100644
--- a/dev-vcs/gitstats/gitstats-0_pre20151223.ebuild
+++ b/dev-vcs/gitstats/gitstats-0_pre20151223.ebuild
@@ -39,6 +39,7 @@ src_prepare() {
sed \
-e "s:basedirs = \[binarypath, secondarypath, '/usr/share/gitstats'\]:basedirs = \['${EPREFIX}/usr/share/gitstats'\]:g" \
-i gitstats || die "failed to fix static files path"
+ eapply "${FILESDIR}"/${P}-grep-force-text.patch
default
}