summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-05-19 05:19:30 +0000
committerintrigeri <intrigeri@boum.org>2019-05-19 05:19:45 +0000
commit26f636bdd4455d398466d172ac89e794f2853217 (patch)
treede2084a5e4743c639648912aa2b8168eccc4fd7a
parent66b67bd21baed5087cae0530773370da46c83b97 (diff)
Revert "Build system: try to be smart again by fetching only the refs we need."
This optimization overrides the trick we have on Jenkins (set_origin_base_branch_head in https://git.tails.boum.org/jenkins-jobs/tree/macros/builders.yaml), that ensures that a reproducibly_build_Tails_ISO_* job builds from the commit used by the first build. This reverts commit 6093f369a00a95bc8705aef31a10f918996f5fc3. Refs: #16730
-rwxr-xr-xvagrant/provision/assets/build-tails18
1 files changed, 2 insertions, 16 deletions
diff --git a/vagrant/provision/assets/build-tails b/vagrant/provision/assets/build-tails
index 1a0d083..cabbc0b 100755
--- a/vagrant/provision/assets/build-tails
+++ b/vagrant/provision/assets/build-tails
@@ -92,22 +92,8 @@ cd "${TAILS_GIT_DIR}"
# option is set) later in auto/build.
git config remote.origin.fetch +refs/remotes/origin/*:refs/remotes/origin/*
-# Ensure we have the Git refs we need:
-git fetch origin "${GIT_REF}"
-# The repo we cloned above (the host's repo) will expose *its* local
-# checkouts of branches. We know that the GIT_REF ref will be
-# up-to-date since it is what is checked out on the host, so we could
-# just fetch it above, but for any other ref (read: branch) the local
-# checkout could be very out-of-date, or worse: it may not even exist,
-# making any attempt at merging the base branch below fail. We work
-# around this by fetching the ref from the host's origin (most likely
-# the official Tails repo) where the base branch refs must exist and
-# be as up-to-date as possible (i.e. since the host's last fetch).
-if [ "${TAILS_MERGE_BASE_BRANCH}" = 1 ]; then
- git fetch origin "origin/$(cat config/base_branch)"
-fi
-
-# Ensure we have the same Git state as on the host:
+# Ensure we have the same Git state as on the host
+git fetch --tags
git checkout --force "${GIT_REF}"
git reset --hard "${GIT_COMMIT}"
git submodule update --init