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
f27c5613
Commit
f27c5613
authored
Oct 26, 2013
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recursive copying fixes and tests
Use the `cp -f` flag to force unlinking non-writable files. Closes #384
parent
273bc17f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletions
+42
-1
bin/ruby-build
+1
-1
test/build.bats
+41
-0
No files found.
bin/ruby-build
View file @
f27c5613
...
...
@@ -510,7 +510,7 @@ remove_windows_files() {
build_package_copy
()
{
mkdir
-p
"
$PREFIX_PATH
"
cp
-R
.
"
$PREFIX_PATH
"
cp
-
f
R
.
"
$PREFIX_PATH
"
}
before_install_package
()
{
...
...
test/build.bats
View file @
f27c5613
...
...
@@ -106,3 +106,44 @@ OUT
unstub gmake
unstub uname
}
@test "copy strategy forces overwrite" {
export RUBY_BUILD_CACHE_PATH="$FIXTURE_ROOT"
mkdir -p "$INSTALL_ROOT/bin"
touch "$INSTALL_ROOT/bin/package"
chmod -w "$INSTALL_ROOT/bin/package"
install_fixture definitions/without-checksum
assert_success
run "$INSTALL_ROOT/bin/package" "world"
assert_success "hello world"
}
@test "mruby strategy overwrites non-writable files" {
mkdir -p "$RUBY_BUILD_CACHE_PATH"
cd "$RUBY_BUILD_CACHE_PATH"
mkdir -p "mruby-1.0/build/host/bin"
touch "mruby-1.0/build/host/bin"/{mruby,mirb}
tar czf "mruby-1.0.tar.gz" "mruby-1.0"
mkdir -p "$INSTALL_ROOT/bin"
touch "$INSTALL_ROOT/bin/mruby"
chmod -w "$INSTALL_ROOT/bin/mruby"
cat > "definition" <<DEF
install_package "mruby-1.0" "http://ruby-lang.org/pub/mruby-1.0.tar.gz" mruby
DEF
stub rake true
run ruby-build "definition" "$INSTALL_ROOT"
assert_success
unstub rake
assert [ -w "$INSTALL_ROOT/bin/mruby" ]
assert [ -e "$INSTALL_ROOT/bin/ruby" ]
assert [ -e "$INSTALL_ROOT/bin/irb" ]
}
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