[CalendarServer-changes] [12462] CalendarServer/trunk/bin/_build.sh
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:22:10 PDT 2014
Revision: 12462
http://trac.calendarserver.org//changeset/12462
Author: wsanchez at apple.com
Date: 2014-01-28 10:51:57 -0800 (Tue, 28 Jan 2014)
Log Message:
-----------
Fix up force_setup.
Modified Paths:
--------------
CalendarServer/trunk/bin/_build.sh
Modified: CalendarServer/trunk/bin/_build.sh
===================================================================
--- CalendarServer/trunk/bin/_build.sh 2014-01-28 18:39:51 UTC (rev 12461)
+++ CalendarServer/trunk/bin/_build.sh 2014-01-28 18:51:57 UTC (rev 12462)
@@ -101,6 +101,10 @@
mkdir -p "${dep_sources}";
+ if "${force_setup}"; then
+ rm -rf "${py_root}";
+ fi;
+
# Set up virtual environment
"${bootstrap_python}" -m virtualenv "${py_root}";
@@ -176,7 +180,10 @@
local path="$1"; shift;
local url="$1"; shift;
- if "${force_setup}" || [ ! -d "${path}" ]; then
+ if "${force_setup}"; then
+ rm -rf "${path}";
+ fi;
+ if [ ! -d "${path}" ]; then
local ext="$(echo "${url}" | sed 's|^.*\.\([^.]*\)$|\1|')";
untar () { tar -xvf -; }
@@ -429,7 +436,10 @@
export PKG_CONFIG_PATH="${dstroot}/lib/pkgconfig:${PKG_CONFIG_PATH:-}";
if "${do_setup}"; then
- if "${force_setup}" || [ ! -d "${dstroot}" ]; then
+ if "${force_setup}"; then
+ rm -rf "${dstroot}";
+ fi;
+ if [ ! -d "${dstroot}" ]; then
echo "Building ${name}...";
cd "${srcdir}";
./configure --prefix="${dstroot}" "$@";
@@ -554,19 +564,21 @@
ruler "Preparing Python requirements: ${requirements}";
echo "";
- if ! "${python}" -m pip install \
- --requirement "${requirements}" \
- --download-cache "${dev_home}/pip_cache" \
- --log "${dev_home}/pip.log" \
- ; then
- err=$?;
- echo "Unable to set up Python requirements: ${requirements}";
- if [ "${requirements#${wd}/requirements/py_opt_}" != "${requirements}" ]; then
- echo "Requirements ${requirements} are optional; continuing.";
- else
- echo "";
- echo "pip log: ${dev_home}/pip.log";
- return 1;
+ if "${do_setup}"; then
+ if ! "${python}" -m pip install \
+ --requirement "${requirements}" \
+ --download-cache "${dev_home}/pip_cache" \
+ --log "${dev_home}/pip.log" \
+ ; then
+ err=$?;
+ echo "Unable to set up Python requirements: ${requirements}";
+ if [ "${requirements#${wd}/requirements/py_opt_}" != "${requirements}" ]; then
+ echo "Requirements ${requirements} are optional; continuing.";
+ else
+ echo "";
+ echo "pip log: ${dev_home}/pip.log";
+ return 1;
+ fi;
fi;
fi;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/ff8655c0/attachment.html>
More information about the calendarserver-changes
mailing list