diff --git a/build_library/catalyst.sh b/build_library/catalyst.sh index 8d53a23863..600a9eff26 100644 --- a/build_library/catalyst.sh +++ b/build_library/catalyst.sh @@ -226,8 +226,7 @@ search_for_sdk_seed() { for check_path in \ "${CATALYST_ROOT}/builds/coreos-sdk/${SDK_TARBALL}" \ "${CATALYST_ROOT}/builds/seeds/${SDK_TARBALL}" \ - "/var/cache/chromeos-cache/sdks/${SDK_TARBALL}" \ - "/mnt/host/source/.cache/sdks/${SDK_TARBALL}" + "${REPO_CACHE_DIR}/sdks/${SDK_TARBALL}" \ do if [[ -f "${check_path}" ]]; then info "Using SDK for seed: ${check_path}" diff --git a/build_library/generate_au_zip.py b/build_library/generate_au_zip.py index 9dc24d1fb4..249cda43ff 100755 --- a/build_library/generate_au_zip.py +++ b/build_library/generate_au_zip.py @@ -16,13 +16,16 @@ import subprocess import sys import tempfile +REPO_MANIFESTS_DIR = os.environ['REPO_MANIFESTS_DIR'] +SCRIPTS_DIR = os.environ['SCRIPTS_DIR'] + # GLOBALS STATIC_FILES = ['/usr/bin/old_bins/cgpt', '/usr/bin/cros_generate_update_payload', - '~/trunk/.repo/manifests/version.txt', - '~/trunk/src/scripts/chromeos-common.sh', - '~/trunk/src/scripts/common.sh', - '~/trunk/src/scripts/core_upload_update', + '%s/version.txt' % REPO_MANIFESTS_DIR, + '%s/chromeos-common.sh' % SCRIPTS_DIR, + '%s/common.sh' % SCRIPTS_DIR, + '%s/core_upload_update' % SCRIPTS_DIR, ] DYNAMIC_EXECUTABLES = ['/usr/bin/delta_generator', diff --git a/common.sh b/common.sh index b1cba1c95f..0e6242a72a 100644 --- a/common.sh +++ b/common.sh @@ -292,15 +292,20 @@ get_gclient_root # Note that 'realpath' is equivalent to 'readlink -f'. SCRIPT_LOCATION=$(readlink -f "${SCRIPT_LOCATION}") GCLIENT_ROOT=$(readlink -f "${GCLIENT_ROOT}") +# TODO(marineam): I'm tempted to deprecate GCLIENT_ROOT, this isn't Google +# and even if it was the source is managed by 'repo', not 'gclient' +REPO_ROOT="${GCLIENT_ROOT}" # Other directories should always be pathed down from GCLIENT_ROOT. SRC_ROOT="${GCLIENT_ROOT}/src" SRC_INTERNAL="${GCLIENT_ROOT}/src-internal" SCRIPTS_DIR="${SRC_ROOT}/scripts" BUILD_LIBRARY_DIR="${SCRIPTS_DIR}/build_library" +REPO_CACHE_DIR="${REPO_ROOT}/.cache" +REPO_MANIFESTS_DIR="${REPO_ROOT}/.repo/manifests" # Source COREOS_* from manifest for version information. -COREOS_VERSION_FILE="${GCLIENT_ROOT}/.repo/manifests/version.txt" +COREOS_VERSION_FILE="${REPO_MANIFESTS_DIR}/version.txt" if [[ ! -f "${COREOS_VERSION_FILE}" ]]; then COREOS_VERSION_FILE="${SCRIPT_LOCATION}/version.txt" fi diff --git a/tag_release b/tag_release index 8552704008..4fd5ec6b83 100755 --- a/tag_release +++ b/tag_release @@ -27,7 +27,7 @@ switch_to_strict_mode BRANCH_NAME="build-${FLAGS_build}" TAG_NAME="v${FLAGS_build}.${FLAGS_branch}.${FLAGS_patch}" -cd "${GCLIENT_ROOT}/.repo/manifests" +cd "${REPO_MANIFESTS_DIR}" # Clean up existing branch manifest(s) excluding: # - the current branch if the file already exists.