summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-08-24 13:04:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-24 19:49:32 -0700
commitcd80b4fc6dc06ff36ed8e3423b9cf990856d7145 (patch)
treec94034454a162565617639f6623a556bb2c7d86e /bitbake
parent64c1f93828402ffb5c0fada527724598bc300973 (diff)
downloadast2050-yocto-poky-cd80b4fc6dc06ff36ed8e3423b9cf990856d7145.zip
ast2050-yocto-poky-cd80b4fc6dc06ff36ed8e3423b9cf990856d7145.tar.gz
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 <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/git.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 25c2c51..97bf086 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
OpenPOWER on IntegriCloud