summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-05-27 11:49:29 -0300
committerRenato Botelho <renato@netgate.com>2016-05-27 11:49:29 -0300
commit798f04132f1e8793d1b3fe347f5e7bff85262495 (patch)
tree019c8d1dc98dca1fc85c3fb46f0e4a44641a6c84
parentfa7f03b483a69d22efb4a356dfa615f4f8731234 (diff)
downloadpfsense-798f04132f1e8793d1b3fe347f5e7bff85262495.zip
pfsense-798f04132f1e8793d1b3fe347f5e7bff85262495.tar.gz
Send .real* directories first to final server
-rw-r--r--tools/builder_common.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index 1e8c8c7..1f012e1 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -1943,11 +1943,28 @@ pkg_repo_rsync() {
fi
if [ -n "${_IS_RELEASE}" -o "${_repo_path_param}" = "${CORE_PKG_PATH}" ]; then
+ # Send .real* directories first to prevent having a broken repo while transfer happens
local _cmd="rsync -Have \"ssh -p ${PKG_FINAL_RSYNC_SSH_PORT}\" \
+ --timeout=60 ${PKG_RSYNC_DESTDIR}/./${_repo_base%%-core}* \
+ --include=\"/*\" --include=\"*/.real*\" --include=\"*/.real*/*\" \
+ --exclude=\"*\" \
+ ${PKG_FINAL_RSYNC_USERNAME}@${PKG_FINAL_RSYNC_HOSTNAME}:${PKG_FINAL_RSYNC_DESTDIR}"
+
+ echo -n ">>> Sending updated packages to ${PKG_FINAL_RSYNC_HOSTNAME}... " | tee -a ${_logfile}
+ if script -aq ${_logfile} ssh -p ${PKG_RSYNC_SSH_PORT} \
+ ${PKG_RSYNC_USERNAME}@${PKG_RSYNC_HOSTNAME} ${_cmd} >/dev/null 2>&1; then
+ echo "Done!" | tee -a ${_logfile}
+ else
+ echo "Failed!" | tee -a ${_logfile}
+ echo ">>> ERROR: An error occurred sending repo to final hostname"
+ print_error_pfS
+ fi
+
+ _cmd="rsync -Have \"ssh -p ${PKG_FINAL_RSYNC_SSH_PORT}\" \
--timeout=60 --delete-delay ${PKG_RSYNC_DESTDIR}/./${_repo_base%%-core}* \
${PKG_FINAL_RSYNC_USERNAME}@${PKG_FINAL_RSYNC_HOSTNAME}:${PKG_FINAL_RSYNC_DESTDIR}"
- echo -n ">>> Sending updated repositories to ${PKG_FINAL_RSYNC_HOSTNAME}... " | tee -a ${_logfile}
+ echo -n ">>> Sending updated repositories metadata to ${PKG_FINAL_RSYNC_HOSTNAME}... " | tee -a ${_logfile}
if script -aq ${_logfile} ssh -p ${PKG_RSYNC_SSH_PORT} \
${PKG_RSYNC_USERNAME}@${PKG_RSYNC_HOSTNAME} ${_cmd} >/dev/null 2>&1; then
echo "Done!" | tee -a ${_logfile}
OpenPOWER on IntegriCloud