summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-05-26 11:36:48 +0200
committerMichał Górny <mgorny@gentoo.org>2016-05-26 12:17:57 +0200
commit6cef2dedb847c719610f10cb18b354e88863acfa (patch)
tree5f6dff0a1c09e49a4bf350b7f61b3dafde2ea8b6 /eclass/git-r3.eclass
parentp/p/l-s/profile.bashrc: refactorize with elif. (diff)
downloadgentoo-6cef2dedb847c719610f10cb18b354e88863acfa.tar.gz
gentoo-6cef2dedb847c719610f10cb18b354e88863acfa.tar.bz2
gentoo-6cef2dedb847c719610f10cb18b354e88863acfa.zip
git-r3.eclass: Do not create clone dirs if EVCS_OFFLINE is being used
Diffstat (limited to 'eclass/git-r3.eclass')
-rw-r--r--eclass/git-r3.eclass10
1 files changed, 9 insertions, 1 deletions
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index f30600b930ad..99e2ed9edd60 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -343,7 +343,7 @@ _git-r3_set_gitdir() {
GIT_DIR=${EGIT3_STORE_DIR}/${repo_name}
- if [[ ! -d ${EGIT3_STORE_DIR} ]]; then
+ if [[ ! -d ${EGIT3_STORE_DIR} && ! ${EVCS_OFFLINE} ]]; then
(
addwrite /
mkdir -p "${EGIT3_STORE_DIR}"
@@ -352,6 +352,14 @@ _git-r3_set_gitdir() {
addwrite "${EGIT3_STORE_DIR}"
if [[ ! -d ${GIT_DIR} ]]; then
+ if [[ ${EVCS_OFFLINE} ]]; then
+ eerror "A clone of the following repository is required to proceed:"
+ eerror " ${1}"
+ eerror "However, networking activity has been disabled using EVCS_OFFLINE and there"
+ eerror "is no local clone available."
+ die "No local clone of ${1}. Unable to proceed with EVCS_OFFLINE."
+ fi
+
local saved_umask
if [[ ${EVCS_UMASK} ]]; then
saved_umask=$(umask)