* [PATCH 0/1] Add checkstatus command to the git fetcher @ 2011-08-24 20:04 Joshua Lock 2011-08-24 20:04 ` [PATCH 1/1] bb/fetch2/git: add checkstatus command Joshua Lock 0 siblings, 1 reply; 3+ messages in thread From: Joshua Lock @ 2011-08-24 20:04 UTC (permalink / raw) To: bitbake-devel I'd like to use the fetcher's checkstatus method in the network sanity check of OpenEmbedded Core, to that end I've implemented the checkstatus method for the git fetcher using the ls-remote sub-command of git. The following changes since commit 692c2fcead5c82249359ad54d2c7941d087a2eb3: usermanual: The git fetcher defaults to the git protocol (or file) (2011-08-23 09:59:50 -0700) are available in the git repository at: git://github.com/incandescant/bitbake fetch https://github.com/incandescant/bitbake/tree/fetch Joshua Lock (1): bb/fetch2/git: add checkstatus command lib/bb/fetch2/git.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) -- 1.7.6 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] bb/fetch2/git: add checkstatus command 2011-08-24 20:04 [PATCH 0/1] Add checkstatus command to the git fetcher Joshua Lock @ 2011-08-24 20:04 ` Joshua Lock 2011-08-25 2:32 ` Richard Purdie 0 siblings, 1 reply; 3+ messages in thread From: Joshua Lock @ 2011-08-24 20:04 UTC (permalink / raw) To: bitbake-devel Use git ls-remote to implement checkstatus command for the git fetcher. Signed-off-by: Joshua Lock <josh@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 -- 1.7.6 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] bb/fetch2/git: add checkstatus command 2011-08-24 20:04 ` [PATCH 1/1] bb/fetch2/git: add checkstatus command Joshua Lock @ 2011-08-25 2:32 ` Richard Purdie 0 siblings, 0 replies; 3+ messages in thread From: Richard Purdie @ 2011-08-25 2:32 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel 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@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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-25 2:37 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-24 20:04 [PATCH 0/1] Add checkstatus command to the git fetcher Joshua Lock 2011-08-24 20:04 ` [PATCH 1/1] bb/fetch2/git: add checkstatus command Joshua Lock 2011-08-25 2:32 ` Richard Purdie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox