1 |
commit: 93db43bd48d1ad8a64996e52b73838d6318207e6 |
2 |
Author: Guilherme Amadio <amadio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 1 12:54:54 2016 +0000 |
4 |
Commit: Guilherme Amadio <amadio <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 1 13:09:55 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93db43bd |
7 |
|
8 |
dev-vcs/gitstats: force text processing by grep |
9 |
|
10 |
Fix for bug 575946 by forcing grep to process commit data as text even when |
11 |
invalid unicode characters appear. |
12 |
|
13 |
Reported-by: Martin Mokrejš |
14 |
|
15 |
Package-Manager: portage-2.2.28 |
16 |
|
17 |
.../files/gitstats-0_pre20151223-grep-force-text.patch | 11 +++++++++++ |
18 |
dev-vcs/gitstats/gitstats-0_pre20151223.ebuild | 1 + |
19 |
2 files changed, 12 insertions(+) |
20 |
|
21 |
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 |
22 |
new file mode 100644 |
23 |
index 0000000..9663afc |
24 |
--- /dev/null |
25 |
+++ b/dev-vcs/gitstats/files/gitstats-0_pre20151223-grep-force-text.patch |
26 |
@@ -0,0 +1,11 @@ |
27 |
+--- a/gitstats 2016-04-01 09:46:31.000000000 -0300 |
28 |
++++ b/gitstats 2016-04-01 09:46:18.458667610 -0300 |
29 |
+@@ -327,7 +327,7 @@ |
30 |
+ |
31 |
+ # Collect revision statistics |
32 |
+ # Outputs "<stamp> <date> <time> <timezone> <author> '<' <mail> '>'" |
33 |
+- lines = getpipeoutput(['git rev-list --pretty=format:"%%at %%ai %%aN <%%aE>" %s' % getlogrange('HEAD'), 'grep -v ^commit']).split('\n') |
34 |
++ lines = getpipeoutput(['git rev-list --pretty=format:"%%at %%ai %%aN <%%aE>" %s' % getlogrange('HEAD'), 'grep -av ^commit']).split('\n') |
35 |
+ for line in lines: |
36 |
+ parts = line.split(' ', 4) |
37 |
+ author = '' |
38 |
|
39 |
diff --git a/dev-vcs/gitstats/gitstats-0_pre20151223.ebuild b/dev-vcs/gitstats/gitstats-0_pre20151223.ebuild |
40 |
index a4a6a19..451a152 100644 |
41 |
--- a/dev-vcs/gitstats/gitstats-0_pre20151223.ebuild |
42 |
+++ b/dev-vcs/gitstats/gitstats-0_pre20151223.ebuild |
43 |
@@ -39,6 +39,7 @@ src_prepare() { |
44 |
sed \ |
45 |
-e "s:basedirs = \[binarypath, secondarypath, '/usr/share/gitstats'\]:basedirs = \['${EPREFIX}/usr/share/gitstats'\]:g" \ |
46 |
-i gitstats || die "failed to fix static files path" |
47 |
+ eapply "${FILESDIR}"/${P}-grep-force-text.patch |
48 |
default |
49 |
} |