Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not copy src directory if -S option is also given when src method is used #436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions src/share/poudriere/jail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -416,22 +416,24 @@ build_and_install_world() {
install_from_src() {
local cpignore_flag cpignore

msg_n "Copying ${SRC_BASE} to ${JAILMNT}/usr/src..."
mkdir -p ${JAILMNT}/usr/src
if [ -f ${SRC_BASE}/usr/src/.cpignore ]; then
cpignore_flag="-x"
else
cpignore=$(mktemp -t cpignore)
cpignore_flag="-X ${cpignore}"
# Ignore some files
cat > ${cpignore} <<-EOF
.git
.svn
EOF
if [ -z "$SRCPATH" ] ; then
msg_n "Copying ${SRC_BASE} to ${JAILMNT}/usr/src..."
mkdir -p ${JAILMNT}/usr/src
if [ -f ${SRC_BASE}/usr/src/.cpignore ]; then
cpignore_flag="-x"
else
cpignore=$(mktemp -t cpignore)
cpignore_flag="-X ${cpignore}"
# Ignore some files
cat > ${cpignore} <<-EOF
.git
.svn
EOF
fi
cpdup -i0 ${cpignore_flag} ${SRC_BASE} ${JAILMNT}/usr/src
[ -n "${cpignore}" ] && rm -f ${cpignore}
echo " done"
fi
cpdup -i0 ${cpignore_flag} ${SRC_BASE} ${JAILMNT}/usr/src
[ -n "${cpignore}" ] && rm -f ${cpignore}
echo " done"

setup_build_env
if [ ${BUILD} -eq 0 ]; then
Expand Down