Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
c79dcb37
Commit
c79dcb37
authored
May 23, 2014
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-galore'
parents
c73b670b
210ceef8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
4 deletions
+36
-4
bin/ruby-build
+7
-1
test/build.bats
+29
-3
No files found.
bin/ruby-build
View file @
c79dcb37
...
@@ -847,9 +847,15 @@ isolated_gem_install() {
...
@@ -847,9 +847,15 @@ isolated_gem_install() {
}
}
apply_ruby_patch
()
{
apply_ruby_patch
()
{
local
patchfile
case
"
$1
"
in
case
"
$1
"
in
ruby-
*
|
jruby-
*
|
rubinius-
*
)
ruby-
*
|
jruby-
*
|
rubinius-
*
)
patch
-p0
-i
"
${
2
:-
-
}
"
patchfile
=
"
$(
mktemp
"
${
TMP
}
/ruby-patch.XXXXXX"
)
"
cat
"
${
2
:-
-
}
"
>
"
$patchfile
"
local
striplevel
=
0
grep
-q
'^diff --git a/'
"
$patchfile
"
&&
striplevel
=
1
patch
-p
$striplevel
--force
-i
"
$patchfile
"
;;
;;
esac
esac
}
}
...
...
test/build.bats
View file @
c79dcb37
...
@@ -85,9 +85,9 @@ OUT
...
@@ -85,9 +85,9 @@ OUT
stub brew false
stub brew false
stub_make_install
stub_make_install
stub_make_install
stub_make_install
stub patch ' : echo patch "$@" >> build.log'
stub patch ' : echo patch "$@"
| sed -E "s/\.[[:alnum:]]+$/.XXX/"
>> build.log'
install_fixture --patch definitions/needs-yaml
TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<""
assert_success
assert_success
unstub make
unstub make
...
@@ -97,7 +97,33 @@ OUT
...
@@ -97,7 +97,33 @@ OUT
yaml-0.1.6: --prefix=$INSTALL_ROOT
yaml-0.1.6: --prefix=$INSTALL_ROOT
make -j 2
make -j 2
make install
make install
patch -p0 -i -
patch -p0 --force -i $TMP/ruby-patch.XXX
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
make install
OUT
}
@test "apply ruby patch from git diff before building" {
cached_tarball "yaml-0.1.6"
cached_tarball "ruby-2.0.0"
stub brew false
stub_make_install
stub_make_install
stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log'
TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.rb"
assert_success
unstub make
unstub patch
assert_build_log <<OUT
yaml-0.1.6: --prefix=$INSTALL_ROOT
make -j 2
make install
patch -p1 --force -i $TMP/ruby-patch.XXX
ruby-2.0.0: --prefix=$INSTALL_ROOT
ruby-2.0.0: --prefix=$INSTALL_ROOT
make -j 2
make -j 2
make install
make install
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment