mirror of
https://github.com/macports/mpbb.git
synced 2026-07-12 18:18:44 -07:00
mp-buildbot: cleanup after gather-archives not install-port
git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@150702 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
cleanup-help() {
|
||||
echo "Clean up build remnants and leftovers caused by the build of port --port."
|
||||
echo "Note that you should not have to run this explicitly, as it is automatically run after install-dependencies on error and in any case after install-port."
|
||||
echo "Note that you should not have to run this explicitly, as it is automatically run after install-dependencies and install-port on error and in any case after gather-archives."
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
|
||||
@@ -14,6 +14,7 @@ gather-archives() {
|
||||
tclsh=${option_prefix}/bin/port-tclsh
|
||||
mkdir -p "${option_staging_dir}" || return $?
|
||||
|
||||
status=0
|
||||
for archive_path in $("${option_prefix}/bin/port" -q location active); do
|
||||
archive_port=$(basename "$(dirname "${archive_path}")")
|
||||
archive_basename=$(basename "${archive_path}")
|
||||
@@ -21,9 +22,12 @@ gather-archives() {
|
||||
if ! ${curl} -fIsL "${option_archive_site}/${archive_port}/${archive_basename}" > /dev/null; then
|
||||
if "${tclsh}" "${option_workdir}/tools/port_binary_distributable.tcl" -v "${archive_port}"; then
|
||||
echo "Staging archive for upload: ${archive_basename}"
|
||||
mkdir -p "${option_staging_dir}/${archive_port}" || return $?
|
||||
cp -p "${archive_path}" "${option_staging_dir}/${archive_port}/${archive_basename}" || return $?
|
||||
mkdir -p "${option_staging_dir}/${archive_port}" || { status=$?; break; }
|
||||
cp -p "${archive_path}" "${option_staging_dir}/${archive_port}/${archive_basename}" || { status=$?; break; }
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cleanup
|
||||
return $status
|
||||
}
|
||||
|
||||
+5
-5
@@ -15,9 +15,9 @@ install-port() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
status=0
|
||||
"${option_prefix}/bin/port" -d install "${option_port}" || status=$?
|
||||
|
||||
cleanup
|
||||
return $status
|
||||
if ! "${option_prefix}/bin/port" -d install "${option_port}"; then
|
||||
echo "Build failed, cleaning up..."
|
||||
cleanup
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user