diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 3e37f76ffb..51259df93f 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -476,11 +476,12 @@ class Git(FetchMethod): | |||
476 | if os.path.exists(destdir): | 476 | if os.path.exists(destdir): |
477 | bb.utils.prunedir(destdir) | 477 | bb.utils.prunedir(destdir) |
478 | 478 | ||
479 | if ud.shallow and os.path.exists(ud.fullshallow) and self.clonedir_need_update(ud, d): | 479 | clonedir_is_up_to_date = not self.clonedir_need_update(ud, d) |
480 | if clonedir_is_up_to_date: | ||
481 | runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, ud.cloneflags, ud.clonedir, destdir), d) | ||
482 | elif ud.shallow and os.path.exists(ud.fullshallow): | ||
480 | bb.utils.mkdirhier(destdir) | 483 | bb.utils.mkdirhier(destdir) |
481 | runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=destdir) | 484 | runfetchcmd("tar -xzf %s" % ud.fullshallow, d, workdir=destdir) |
482 | elif not self.clonedir_need_update(ud, d): | ||
483 | runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, ud.cloneflags, ud.clonedir, destdir), d) | ||
484 | else: | 485 | else: |
485 | raise bb.fetch2.UnpackError("No up to date source found", ud.url) | 486 | raise bb.fetch2.UnpackError("No up to date source found", ud.url) |
486 | 487 | ||