[bitbake-devel] [PATCH 1/1] bb/fetch2/git: add checkstatus command
Richard Purdie
richard.purdie at linuxfoundation.org
Thu Aug 25 02:32:11 UTC 2011
On Wed, 2011-08-24 at 13:04 -0700, Joshua Lock wrote:
> Use git ls-remote to implement checkstatus command for the git fetcher.
>
> Signed-off-by: Joshua Lock <josh at linux.intel.com>
> ---
> lib/bb/fetch2/git.py | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
> index 25c2c51..97bf086 100644
> --- a/lib/bb/fetch2/git.py
> +++ b/lib/bb/fetch2/git.py
> @@ -298,3 +298,11 @@ class Git(FetchMethod):
> buildindex = "%s" % output.split()[0]
> logger.debug(1, "GIT repository for %s in %s is returning %s revisions in rev-list before %s", url, ud.clonedir, buildindex, rev)
> return buildindex
> +
> + def checkstatus(self, uri, ud, d):
> + fetchcmd = "%s ls-remote %s" % (ud.basecmd, uri)
> + try:
> + runfetchcmd(fetchcmd, d, quiet=True)
> + return True
> + except FetchError:
> + return False
Merged to master, thanks.
Richard
More information about the bitbake-devel
mailing list