From cd80b4fc6dc06ff36ed8e3423b9cf990856d7145 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Wed, 24 Aug 2011 13:04:23 -0700 Subject: bb/fetch2/git: add checkstatus command Use git ls-remote to implement checkstatus command for the git fetcher. (Bitbake rev: 0ed281feb6d244d3700da484f4e83394ae394f93) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 25c2c510f6..97bf0865ac 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/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 -- cgit v1.2.3-54-g00ecf