Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 8BC8BE00E03; Thu, 18 Aug 2016 11:49:51 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.49 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 6822FE00F13 for ; Thu, 18 Aug 2016 11:49:37 -0700 (PDT) Received: by mail-pa0-f49.google.com with SMTP id pp5so8508950pac.3 for ; Thu, 18 Aug 2016 11:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GG7X591CuIIEVtNeLM4wCRoP0tY3F5JrV2Tb09wsIyY=; b=Yk4HI/p42ErIUp02M+jg3bymVZA3WwFn2yuatgKModo6vyUEwMVCfuckMTtZowJxkR /lix+g7/QAe/7cZhHTDLPapKYkZdzwJuFjuO40zm1rgMi9qRjD5JVCLpbO/8TDjGszvH 7Btv43MQKiEqLcFfSvTMgtWSXYrmePO4Udg7hwUZsR++Umu3G5Xk87KeLDKS2l2fahpZ vdPfeo9XxU+yWsuI84juYbMzunQ51SiVB2z6Jmzw9QJ9r4GVcmChn11Qg/ByhUAPPAgV C5Fvf2+W9TnKYhPv4E8hP1jxnK49Nxl2QC7Bvtsp8QlJLwWPZVwnIs3KIHem5g2GfwLn /t+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GG7X591CuIIEVtNeLM4wCRoP0tY3F5JrV2Tb09wsIyY=; b=VkwYqMIU9goA9w3fBQNZgBFdZeda1244wmjzDQcOcydr5PnO87cWvHm9eNZL7AtZuK QG8Qho8qgJQlPcKYZ4ptK0+ylyWyOZ21bI271IYAJpg9pODOdv93jdThbKpVkezSViKz odnbyI/tTb7TxIGjmWBO4by/C44grhTkYAnyPfZxXbvi9I8m84qK6Kme6BAuWbx2zbL7 Z5a4XiFA27XYznVrAuP4y7wVpy3sVs1Whd+bIRdi2Ay3skKdwaUeUGBxlX0OTntiMfJ1 0kB+N8krggYDCmL2iQBkwIUWO/kYrz/ctSEsvf6S5vHxwo/lysJEm1iGZDkMdmY9raIs 34sA== X-Gm-Message-State: AEkoouv9EG5GopkswkxMvNQp4H7OhsjTZITLmnukTzak4cR0z7U+G3/dcKeDSuDfGeyjvJwH X-Received: by 10.66.12.102 with SMTP id x6mr6580599pab.48.1471546176543; Thu, 18 Aug 2016 11:49:36 -0700 (PDT) Received: from orion.ger.corp.intel.com (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by smtp.gmail.com with ESMTPSA id w64sm496095pfb.93.2016.08.18.11.49.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Aug 2016 11:49:36 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 18 Aug 2016 19:49:14 +0100 Message-Id: <1471546154-20891-10-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471546154-20891-1-git-send-email-michael.g.wood@intel.com> References: <1471546154-20891-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH v2 9/9] toaster: localhostbecontroller Remove git assumption X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2016 18:49:51 -0000 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 --- 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