[Toaster] [PATCH v2 9/9] toaster: localhostbecontroller Remove git assumption
Smith, Elliot
elliot.smith at intel.com
Mon Aug 22 08:49:02 PDT 2016
Sent upstream and added to toaster-next.
Elliot
On 18 August 2016 at 19:49, Michael Wood <michael.g.wood at intel.com> wrote:
> 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.
>
> Signed-off-by: Michael Wood <michael.g.wood at intel.com>
> ---
> bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 14
> ++++++++++----
> 1 file 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))
> --
> 2.7.4
>
> --
> _______________________________________________
> toaster mailing list
> toaster at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>
>
--
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20160822/219c08b7/attachment.html>
More information about the toaster
mailing list