1 |
commit: 6cef2dedb847c719610f10cb18b354e88863acfa |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 26 09:36:48 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 26 10:17:57 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cef2ded |
7 |
|
8 |
git-r3.eclass: Do not create clone dirs if EVCS_OFFLINE is being used |
9 |
|
10 |
eclass/git-r3.eclass | 10 +++++++++- |
11 |
1 file changed, 9 insertions(+), 1 deletion(-) |
12 |
|
13 |
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass |
14 |
index f30600b..99e2ed9 100644 |
15 |
--- a/eclass/git-r3.eclass |
16 |
+++ b/eclass/git-r3.eclass |
17 |
@@ -343,7 +343,7 @@ _git-r3_set_gitdir() { |
18 |
|
19 |
GIT_DIR=${EGIT3_STORE_DIR}/${repo_name} |
20 |
|
21 |
- if [[ ! -d ${EGIT3_STORE_DIR} ]]; then |
22 |
+ if [[ ! -d ${EGIT3_STORE_DIR} && ! ${EVCS_OFFLINE} ]]; then |
23 |
( |
24 |
addwrite / |
25 |
mkdir -p "${EGIT3_STORE_DIR}" |
26 |
@@ -352,6 +352,14 @@ _git-r3_set_gitdir() { |
27 |
|
28 |
addwrite "${EGIT3_STORE_DIR}" |
29 |
if [[ ! -d ${GIT_DIR} ]]; then |
30 |
+ if [[ ${EVCS_OFFLINE} ]]; then |
31 |
+ eerror "A clone of the following repository is required to proceed:" |
32 |
+ eerror " ${1}" |
33 |
+ eerror "However, networking activity has been disabled using EVCS_OFFLINE and there" |
34 |
+ eerror "is no local clone available." |
35 |
+ die "No local clone of ${1}. Unable to proceed with EVCS_OFFLINE." |
36 |
+ fi |
37 |
+ |
38 |
local saved_umask |
39 |
if [[ ${EVCS_UMASK} ]]; then |
40 |
saved_umask=$(umask) |