diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 1a8ebe3da8..cf8bee7382 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -522,9 +522,17 @@ class Git(FetchMethod): | |||
522 | def clean(self, ud, d): | 522 | def clean(self, ud, d): |
523 | """ clean the git directory """ | 523 | """ clean the git directory """ |
524 | 524 | ||
525 | bb.utils.remove(ud.localpath, True) | 525 | to_remove = [ud.localpath, ud.fullmirror, ud.fullmirror + ".done"] |
526 | bb.utils.remove(ud.fullmirror) | 526 | # The localpath is a symlink to clonedir when it is cloned from a |
527 | bb.utils.remove(ud.fullmirror + ".done") | 527 | # mirror, so remove both of them. |
528 | if os.path.islink(ud.localpath): | ||
529 | clonedir = os.path.realpath(ud.localpath) | ||
530 | to_remove.append(clonedir) | ||
531 | |||
532 | for r in to_remove: | ||
533 | if os.path.exists(r): | ||
534 | bb.note('Removing %s' % r) | ||
535 | bb.utils.remove(r, True) | ||
528 | 536 | ||
529 | def supports_srcrev(self): | 537 | def supports_srcrev(self): |
530 | return True | 538 | return True |