Bug 5687

Summary: bitbake -ccleanall doesn't remove the patch.done
Product: [Build System, Metadata & Runtime] BitBake Reporter: Robert Yang <liezhi.yang>
Component: bitbakeAssignee: Robert Yang <liezhi.yang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher, richard.purdie, sgw, yi.zhao
Version: 1.6   
Target Milestone: 1.6 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Robert Yang 2013-12-26 15:21:00 UTC
$ bitbake xf86-video-omapfb -cfetch && bitbake xf86-video-omapfb -ccleanall

The 0006-omapfb-port-to-new-xserver-video-API.patch in the DL_DIR has been removed, but the 0006-omapfb-port-to-new-xserver-video-API.patch.done still exists.

This is because the clean() in the fetch2/__init__.py will skip removing local file, so that it will skip removing the .done, the following patch will fix the problem:

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 8fdf59c..1d89aaf 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1497,7 +1497,7 @@ class Fetch(object):
             ud = self.ud[url]
             ud.setup_localpath(self.d)
 
-            if not ud.localfile or self.localpath is None:
+            if not ud.localfile and ud.localpath is None:
                 continue
 
             if ud.lockfile:
Comment 2 Yi Zhao 2014-01-10 06:53:32 UTC
Verified with master/e93a345fae7c21652547bec501fcb1f3b6c6427d

#######################
$ find ./downloads/ -name  \*omapfb\*
$
$ bitbake xf86-video-omapfb -c fetch
...
...
$ $ find ./downloads/ -name  \*omapfb\*
./downloads/git2_git.pingu.fi.xf86-video-omapfb.tar.gz
./downloads/git2_git.pingu.fi.xf86-video-omapfb.tar.gz.done
./downloads/git2/git.pingu.fi.xf86-video-omapfb
./downloads/git2/git.pingu.fi.xf86-video-omapfb.done
./downloads/0006-omapfb-port-to-new-xserver-video-API.patch.done
$
$ bitbake xf86-video-omapfb -c cleanall
...
...
$ find ./downloads/ -name  \*omapfb\*
$
######################

The patch.done also be removed.