[elixir] Patch around a failing test
Ricky Elrod
codeblock at fedoraproject.org
Sat Jan 11 09:49:48 UTC 2014
commit 0098cb90d1ba81203b2c379f8ec78550293d52ab
Author: Ricky Elrod <ricky at elrod.me>
Date: Sat Jan 11 04:49:51 2014 -0500
Patch around a failing test
elixir.spec | 5 +++++
mix-test-nogit.patch | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/elixir.spec b/elixir.spec
index d50c791..a726a18 100644
--- a/elixir.spec
+++ b/elixir.spec
@@ -16,6 +16,10 @@ BuildRequires: git
Requires: erlang-erts >= R16B
Requires: erlang-inets
+# https://github.com/elixir-lang/elixir/commit/407427f627f7d07f6a6275978b9dc35c7f91a5fb
+# This just fixes a test that failed when it wasn't run from a git clone of Elixir.
+Patch0: mix-test-nogit.patch
+
%description
Elixir is a programming language built on top of the Erlang VM.
As Erlang, it is a functional language built to support distributed,
@@ -23,6 +27,7 @@ fault-tolerant, non-stop applications with hot code swapping.
%prep
%setup -q
+%patch0 -p1
rm rebar
sed -i '/REBAR := /d' Makefile
sed -i '1i REBAR := "$(shell which rebar || echo `pwd`/rebar)"' Makefile
diff --git a/mix-test-nogit.patch b/mix-test-nogit.patch
new file mode 100644
index 0000000..c995edf
--- /dev/null
+++ b/mix-test-nogit.patch
@@ -0,0 +1,17 @@
+diff --git a/lib/mix/lib/mix/scm/git.ex b/lib/mix/lib/mix/scm/git.ex
+index f67086f..47881b5 100644
+--- a/lib/mix/lib/mix/scm/git.ex
++++ b/lib/mix/lib/mix/scm/git.ex
+@@ -143,9 +143,10 @@ defmodule Mix.SCM.Git do
+ end
+
+ defp get_rev_info do
+- [origin, rev] = System.cmd('git config remote.origin.url && git rev-parse --verify --quiet HEAD')
+- |> iolist_to_binary
+- |> String.split("\n", trim: true)
++ destructure [origin, rev],
++ System.cmd('git config remote.origin.url && git rev-parse --verify --quiet HEAD')
++ |> iolist_to_binary
++ |> String.split("\n", trim: true)
+ [ origin: origin, rev: rev ]
+ end
More information about the scm-commits
mailing list