Skip to contentSkip to conversation

fetcher2: remove stamps

PATCH New Robert Yang 1 participant 3 messages Dec 27, 2013

lore
Share & tools
lore
#0 lore raw

cover fetcher2: remove stamps

The following changes since commit 005af45191ded6185c618c708181b31281e43092:

bitbake: fetch2: avoid printing "no checksum" error message twice (2013-12-22 14:29:13 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib robert/fetch_stamp
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/fetch_stamp

Robert Yang (2):
bitbake: fetcher2: clean(): remove the .patch.done
bitbake: fetcher2: git.py: clean(): remove the .tar.gz.done

 bitbake/lib/bb/fetch2/__init__.py |    2 +-
 bitbake/lib/bb/fetch2/git.py      |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 bitbake: fetcher2: clean(): remove the .patch.done

There was a problem:

$ bitbake xf86-video-omapfb -cfetch && bitbake xf86-video-omapfb -ccleanall

Everything should be removed, but the 0006-omapfb-port-to-new-xserver-video-API.patch.done still exists in the DL_DIR, this is because the clean() in the fetch2/__init__.py skips removing the local file, so that it will skip removing the .done.

The local file (file://) isn't needed to be removed since it is not downloaded into DL_DIR, but the .done should be removed, this patch will remove the .done, and it doesn't remove anything else since the clean() in local.py does nothing.

[YOCTO #5687]

---
 bitbake/lib/bb/fetch2/__init__.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/__init__.py +1 -1
index 8fdf59c..1d89aaf 100644
@@ -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:
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/2 bitbake: fetcher2: git.py: clean(): remove the .tar.gz.done

In reply to Robert Yang

There was a problem:

$ bitbake xf86-video-omapfb -cfetch && bitbake xf86-video-omapfb -ccleanall

The git2_git.pingu.fi.xf86-video-omapfb.tar.gz has been removed from the DL_DIR, but the git2_git.pingu.fi.xf86-video-omapfb.tar.gz.done still exists, this is because the "open(ud.donestamp, 'w').close()" in try_mirror_url() will create the git2_git.xxx.tar.gz.done, but no one removes it (the clean() in fetch2/__init__.py removes the DL_DIR/git2/pkg.done)

This only happens on the git fetcher AFAIK.

[YOCTO #5688]

---
 bitbake/lib/bb/fetch2/git.py |    1 +
 1 file changed, 1 insertion(+)
bitbake/lib/bb/fetch2/git.py +1 -0
index bd107db..b4b9368 100644
@@ -283,6 +283,7 @@ class Git(FetchMethod):
 
         bb.utils.remove(ud.localpath, True)
         bb.utils.remove(ud.fullmirror)
+        bb.utils.remove(ud.fullmirror + ".done")
 
     def supports_srcrev(self):
         return True
Signature · 1 line
1.7.10.4