Skip to content

Commit

Permalink
git-r3.eclass: Inroducing EGIT_DIR_NAME var to record all the repos b…
Browse files Browse the repository at this point in the history
…eing fetched in the gir3_src

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 EGIT_DIR_NAME to address this limitation.

see_also: gentoo/gentoolkit#33

Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
  • Loading branch information
hyprsyd committed Oct 15, 2023
1 parent bed5e47 commit 9f02588
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eclass/git-r3.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 /
Expand Down

0 comments on commit 9f02588

Please sign in to comment.