]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: fix checking of repository url
authorEd Bartosh <ed.bartosh@linux.intel.com>
Fri, 16 Sep 2016 16:22:28 +0000 (17:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 20 Sep 2016 14:18:51 +0000 (15:18 +0100)
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 <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/bldcontrol/localhostbecontroller.py

index 39de6dd94e0ada0831fb4a93c82c77f5482d15ba..a64e89b93b8bbe23440d9e1a5271a0c2a4c5f546 100644 (file)
@@ -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