From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id C4AAFE009C9; Wed, 14 Sep 2016 04:04:15 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 9B12BE009BB for ; Wed, 14 Sep 2016 04:04:10 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 14 Sep 2016 04:04:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,333,1470726000"; d="scan'208";a="1055802183" Received: from linux.intel.com ([10.54.29.200]) by fmsmga002.fm.intel.com with ESMTP; 14 Sep 2016 04:04:10 -0700 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.68]) by linux.intel.com (Postfix) with ESMTP id 2A8226A4006; Wed, 14 Sep 2016 04:03:45 -0700 (PDT) From: Ed Bartosh To: toaster@yoctoproject.org Date: Wed, 14 Sep 2016 14:03:38 +0300 Message-Id: <1473851018-28564-1-git-send-email-ed.bartosh@linux.intel.com> X-Mailer: git-send-email 2.1.4 Subject: [PATCH] toaster: fix checking of repository url 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: Wed, 14 Sep 2016 11:04:15 -0000 Toaster checks gir repository url is the same as locally cloned before checking it out to existing local clone. This check can be skipped if commit is 'HEAD' as in this case repository is not hard reset to commit, so the local clone won't be changed. [YOCTO #10163] Signed-off-by: Ed Bartosh --- bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 39de6dd..a64e89b 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -156,7 +156,7 @@ class LocalhostBEController(BuildEnvironmentController): try: localremotes = self._shellcmd("git remote -v", localdirname) - if not giturl in localremotes: + if not giturl in localremotes and commit != 'HEAD': 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 -- 2.1.4