[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2148/8267] bitbake: toaster: localhostbecontroller Remove git assumption
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2148/8267] bitbake: toaster: localhostbecontroller Remove git assumption
- Date: Sat, 16 Dec 2017 22:49:24 +0000 (UTC)
commit de83a8ab6d671dc87ec7f81ebcb868751b4d7355
Author: Michael Wood <michael g wood intel com>
Date: Mon Aug 22 16:42:36 2016 +0100
bitbake: toaster: localhostbecontroller Remove git assumption
We don't need to force everyone to use git for the method in which
openembedded-core is downloaded. For instance it could have been
downloaded and extracted as a tarball.
(Bitbake rev: 8b7180332691a41a013e07a52b26018402141b6a)
Signed-off-by: Michael Wood <michael g wood intel com>
Signed-off-by: Elliot Smith <elliot smith intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
.../toaster/bldcontrol/localhostbecontroller.py | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index fbc5ee9..39de6dd 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -151,11 +151,17 @@ class LocalhostBEController(BuildEnvironmentController):
localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit))
logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" %
(giturl, commit, localdirname))
- # make sure our directory is a git repository
+ # see if our directory is a git repository
if os.path.exists(localdirname):
- localremotes = self._shellcmd("git remote -v", localdirname)
- if not giturl in localremotes:
- raise BuildSetupException("Existing git repository at %s, but with different remotes
('%s', expected '%s'). Toaster will not continue out of fear of damaging something." % (localdirname, ",
".join(localremotes.split("\n")), giturl))
+ try:
+ localremotes = self._shellcmd("git remote -v",
+ localdirname)
+ if not giturl in localremotes:
+ raise BuildSetupException("Existing git repository at %s, but with different remotes
('%s', expected '%s'). Toaster will not continue out of fear of damaging something." % (localdirname, ",
".join(localremotes.split("\n")), giturl))
+ except ShellCmdException:
+ # our localdirname might not be a git repository
+ #- that's fine
+ pass
else:
if giturl in cached_layers:
logger.debug("localhostbecontroller git-copying %s to %s" % (cached_layers[giturl],
localdirname))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]