Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: Arthur Zamarin <arthurzam@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/2] bzr.eclass: Reinstate eclass
Date: Sat, 25 Sep 2021 12:28:09
Message-Id: uh7e8lu0h@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 1/2] bzr.eclass: Reinstate eclass by Arthur Zamarin
1 >>>>> On Sat, 25 Sep 2021, Arthur Zamarin wrote:
2
3 > On 25/09/2021 12:36, Ulrich Müller wrote:
4 >> + if [[ -z ${EBZR_INITIAL_URI} ]]; then
5 >> + bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
6 >> + else
7 >> + # Workaround for faster initial download. This clones the
8 >> + # branch from a fast server (which may be out of date), and
9 >> + # subsequently pulls from the slow original repository.
10 >> + bzr_initial_fetch "${EBZR_INITIAL_URI}" "${branch_dir}"
11 >> + if [[ ${EBZR_REPO_URI} != "${EBZR_INITIAL_URI}" ]]; then
12 >> + EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember --overwrite" \
13 >> + EBZR_OFFLINE="" \
14 >> + bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
15 >> + fi
16
17 > This logic maybe can be improved and made easier, by defaulting
18 > EBZR_INITIAL_URI to be by default EBZR_REPO_URI (as a result, the
19 > first call to bzr_initial_fetch can be done outside the if), and if
20 > the ebuild writer changed it (check using the if here), then do the
21 > next bzr_update.
22
23 > Or another option, instead of setting by default, do the first fetch as:
24 > bzr_initial_fetch "${EBZR_INITIAL_URI:-${EBZR_REPO_URI}}" "${branch_dir}"
25 > But I think this one is less readable.
26
27 >> + fi
28
29 I am going to drop support for EBZR_INITIAL_URI altogether. This was a
30 special case used for GNU Emacs, which historically had a slow original
31 repository and a fast (but possibly out of date) mirror. It is unlikely
32 that we will need this again.
33
34 Ulrich

Attachments

File name MIME type
signature.asc application/pgp-signature