diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-06 18:18:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-06 18:18:59 +0100 |
commit | 0cc52efc8c26bd48b7d9c4bac36f11a2663a7578 (patch) | |
tree | 596a6a3875b4639dddffd93cfd6d0b5c22fc211e /bitbake/lib/bb/fetch/__init__.py | |
parent | d2c925f8a988ba1874a14b19442c46a8f3daa3f3 (diff) | |
download | ast2050-yocto-poky-0cc52efc8c26bd48b7d9c4bac36f11a2663a7578.zip ast2050-yocto-poky-0cc52efc8c26bd48b7d9c4bac36f11a2663a7578.tar.gz |
bitbake: Sync fetch back with upstream
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 95f0d9d..5be4c9c 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py @@ -153,18 +153,18 @@ def fetcher_init(d): Called to initialize the fetchers once the configuration data is known. Calls before this must not hit the cache. """ - pd = bb.persist_data.persist(d) # When to drop SCM head revisions controlled by user policy srcrev_policy = bb.data.getVar('BB_SRCREV_POLICY', d, 1) or "clear" if srcrev_policy == "cache": logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy) elif srcrev_policy == "clear": logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy) + revs = persist_data.persist('BB_URI_HEADREVS', d) try: - bb.fetch.saved_headrevs = pd['BB_URI_HEADREVS'].items() + bb.fetch.saved_headrevs = revs.items() except: pass - del pd['BB_URI_HEADREVS'] + revs.clear() else: raise FetchError("Invalid SRCREV cache policy of: %s" % srcrev_policy) @@ -178,8 +178,7 @@ def fetcher_compare_revisions(d): return true/false on whether they've changed. """ - pd = bb.persist_data.persist(d) - data = pd['BB_URI_HEADREVS'].items() + data = persist_data.persist('BB_URI_HEADREVS', d).items() data2 = bb.fetch.saved_headrevs changed = False @@ -756,8 +755,7 @@ class Fetch(object): if not hasattr(self, "_latest_revision"): raise ParameterError - pd = bb.persist_data.persist(d) - revs = pd['BB_URI_HEADREVS'] + revs = persist_data.persist('BB_URI_HEADREVS', d) key = self.generate_revision_key(url, ud, d) try: return revs[key] @@ -772,8 +770,7 @@ class Fetch(object): if hasattr(self, "_sortable_revision"): return self._sortable_revision(url, ud, d) - pd = bb.persist_data.persist(d) - localcounts = pd['BB_URI_LOCALCOUNT'] + localcounts = persist_data.persist('BB_URI_LOCALCOUNT', d) key = self.generate_revision_key(url, ud, d) latest_rev = self._build_revision(url, ud, d) |