Gentoo Archives: gentoo-dev

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-dev@l.g.o
Cc: arthurzam@g.o, "Ulrich Müller" <ulm@g.o>
Subject: [gentoo-dev] [PATCH v2 4/6] bzr.eclass: Fix EBZR_OFFLINE logic
Date: Sat, 25 Sep 2021 12:30:13
Message-Id: 20210925122834.18686-4-ulm@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2 1/6] bzr.eclass: Reinstate eclass by "Ulrich Müller"
1 Signed-off-by: Ulrich Müller <ulm@g.o>
2 ---
3 eclass/bzr.eclass | 7 +++----
4 1 file changed, 3 insertions(+), 4 deletions(-)
5
6 diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
7 index d5ac999aeb8c..de73aed7f676 100644
8 --- a/eclass/bzr.eclass
9 +++ b/eclass/bzr.eclass
10 @@ -158,8 +158,8 @@ EXPORT_FUNCTIONS src_unpack
11 _bzr_initial_fetch() {
12 local repo_uri=$1 branch_dir=$2
13
14 - if [[ -n "${EBZR_OFFLINE}" ]]; then
15 - ewarn "EBZR_OFFLINE cannot be used when there is no local branch yet."
16 + if [[ -n ${EBZR_OFFLINE} ]]; then
17 + die "EBZR_OFFLINE cannot be used when there is no local branch yet."
18 fi
19
20 # fetch branch
21 @@ -179,7 +179,7 @@ _bzr_initial_fetch() {
22 _bzr_update() {
23 local repo_uri=$1 branch_dir=$2
24
25 - if [[ -n "${EBZR_OFFLINE}" ]]; then
26 + if [[ -n ${EBZR_OFFLINE} ]]; then
27 einfo "skipping bzr pull -->"
28 einfo " repository: ${repo_uri}"
29 else
30 @@ -241,7 +241,6 @@ bzr_fetch() {
31 _bzr_initial_fetch "${EBZR_INITIAL_URI}" "${branch_dir}"
32 if [[ ${EBZR_REPO_URI} != "${EBZR_INITIAL_URI}" ]]; then
33 EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember --overwrite" \
34 - EBZR_OFFLINE="" \
35 bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
36 fi
37 fi
38 --
39 2.33.0