diff options
author | Siddhanth Rathod <xsiddhanthrathod@gmail.com> | 2023-09-30 13:57:33 +0530 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-11-10 11:31:25 +0100 |
commit | b60c234d49ac880d249c5c457790f1233985ad3e (patch) | |
tree | 565b1bb70cb941c73b0ea5f42192e23fd7182b60 /eclass | |
parent | app-backup/bacula: Add comment (diff) | |
download | gentoo-b60c234d49ac880d249c5c457790f1233985ad3e.tar.gz gentoo-b60c234d49ac880d249c5c457790f1233985ad3e.tar.bz2 gentoo-b60c234d49ac880d249c5c457790f1233985ad3e.zip |
git-r3.eclass: Inroducing EVCS_STORE_DIRS var
ebuilds which calls git-r3_fetch multiple times for diffrent repos.
While EGIT_DIR stores a single repo path,
mapping all repos to such packages is currently unfeasible.
Introducing EVCS_STORE_DIRS to address this limitation.
See-Also: https://github.com/gentoo/gentoolkit/pull/33
Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33133
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/git-r3.eclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index 83c5ab590c39..a08845364296 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -120,6 +120,14 @@ fi # usage. : "${EGIT_LFS_CLONE_TYPE:=shallow}" +# @ECLASS_VARIABLE: EVCS_STORE_DIRS +# @OUTPUT_VARIABLE +# @DESCRIPTION: +# Record of names of all the repositories directories being cloned in the git3_src. +# This is useful in the case of ebuild that fetch multiple repos and +# it would be used by eclean to clean them up. +EVCS_STORE_DIRS=() + # @ECLASS_VARIABLE: EGIT3_STORE_DIR # @USER_VARIABLE # @DEFAULT_UNSET @@ -360,6 +368,8 @@ _git-r3_set_gitdir() { GIT_DIR=${EGIT3_STORE_DIR}/${repo_name} + EVCS_STORE_DIRS+=( "${GIT_DIR}" ) + if [[ ! -d ${EGIT3_STORE_DIR} && ! ${EVCS_OFFLINE} ]]; then ( addwrite / |