Gentoo Development Guide

GIT.ECLASS

Section: portage (5)
Updated: Aug 2013
Index Return to Main Contents
 

NAME

git.eclass - Fetching and unpacking of git repositories  

DESCRIPTION

The git eclass provides functions to fetch, patch and bootstrap software sources from git repositories and is based on the subversion eclass. It is necessary to define at least the EGIT_REPO_URI variable.

THANKS TO: Fernando J. Pereda <ferdy@gentoo.org>  

FUNCTIONS

git_submodules
Internal function wrapping the submodule initialisation and update
git_branch
Internal function that changes branch for the repo based on EGIT_TREE and EGIT_BRANCH variables.
git_fetch
Gets repository from EGIT_REPO_URI and store it in specified EGIT_STORE_DIR
git_bootstrap
Runs bootstrap command if EGIT_BOOTSTRAP variable contains some value Remember that what ever gets to the EGIT_BOOTSTRAP variable gets evaled by bash.
git_apply_patches
Apply patches from EGIT_PATCHES bash array. Preferred is using the variable as bash array but for now it allows to write it also as normal space separated string list. (This part of code should be removed when all ebuilds get converted on bash array).
git_src_unpack
src_upack function, calls src_prepare one if EAPI!=2.
git_src_prepare
src_prepare function for git stuff. Patches, bootstrap...
 

ECLASS VARIABLES

EGIT_QUIET ?= ${ESCM_QUIET}
Set to non-empty value to supress some eclass messages.
EGIT_STORE_DIR ?= "${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"
Storage directory for git sources. Can be redefined.
EGIT_UNPACK_DIR
Directory to unpack git sources in.
EGIT_HAS_SUBMODULES
Set this to non-empty value to enable submodule support (slower).
EGIT_FETCH_CMD ?= "git clone"
Command for cloning the repository.
EGIT_UPDATE_CMD
Git fetch command.
EGIT_DIFFSTAT_CMD = "git --no-pager diff --stat"
Git command for diffstat.
EGIT_OPTIONS
This variable value is passed to clone and fetch.
EGIT_MASTER ?= master
Variable for specifying master branch. Usefull when upstream don't have master branch.
EGIT_REPO_URI
URI for the repository e.g. http://foo, git://bar Supported protocols:
  http://
  https://
  git://
  git+ssh://
  rsync://
  ssh://
EGIT_PROJECT ?= ${PN}
Project name, it must be unique across EGIT_STORE_DIR. Git eclass will check out the git repository into ${EGIT_STORE_DIR}/${EGIT_PROJECT}/${EGIT_REPO_URI##*/} Default is ${PN}.
EGIT_BOOTSTRAP
bootstrap script or command like autogen.sh or etc...
EGIT_OFFLINE ?= ${ESCM_OFFLINE}
Set this variable to a non-empty value to disable the automatic updating of an GIT source tree. This is intended to be set outside the git source tree by users.
EGIT_PATCHES
Similar to PATCHES array from base.eclass Only difference is that this patches are applied before bootstrap. Please take note that this variable should be bash array.
EGIT_BRANCH
git eclass can fetch any branch in git_fetch().
EGIT_COMMIT
git eclass can checkout any commit.
EGIT_REPACK
Set to non-empty value to repack objects to save disk space. However this can take a long time with VERY big repositories.
EGIT_PRUNE
Set to non-empty value to prune loose objects on each fetch. This is useful if upstream rewinds and rebases branches often.
 

MAINTAINERS

Donnie Berkholz <dberkholz@gentoo.org>
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

FILES

/usr/portage/eclass/git.eclass  

SEE ALSO

ebuild(5)
http://sources.gentoo.org/eclass/git.eclass?view=log


 

Index

NAME
DESCRIPTION
FUNCTIONS
ECLASS VARIABLES
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:25:05 GMT, August 02, 2013