diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 5b678827ed..0ea55e139d 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -727,6 +727,11 @@ class Git(FetchMethod): clonedir = os.path.realpath(ud.localpath) to_remove.append(clonedir) + # Remove shallow mirror tarball + if ud.shallow: + to_remove.append(ud.fullshallow) + to_remove.append(ud.fullshallow + ".done") + for r in to_remove: if os.path.exists(r): bb.note('Removing %s' % r)