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 | |
parent | d2c925f8a988ba1874a14b19442c46a8f3daa3f3 (diff) | |
download | 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')
-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 95f0d9d553..5be4c9caea 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -153,18 +153,18 @@ def fetcher_init(d): | |||
153 | Called to initialize the fetchers once the configuration data is known. | 153 | Called to initialize the fetchers once the configuration data is known. |
154 | Calls before this must not hit the cache. | 154 | Calls before this must not hit the cache. |
155 | """ | 155 | """ |
156 | pd = bb.persist_data.persist(d) | ||
157 | # When to drop SCM head revisions controlled by user policy | 156 | # When to drop SCM head revisions controlled by user policy |
158 | srcrev_policy = bb.data.getVar('BB_SRCREV_POLICY', d, 1) or "clear" | 157 | srcrev_policy = bb.data.getVar('BB_SRCREV_POLICY', d, 1) or "clear" |
159 | if srcrev_policy == "cache": | 158 | if srcrev_policy == "cache": |
160 | logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy) | 159 | logger.debug(1, "Keeping SRCREV cache due to cache policy of: %s", srcrev_policy) |
161 | elif srcrev_policy == "clear": | 160 | elif srcrev_policy == "clear": |
162 | logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy) | 161 | logger.debug(1, "Clearing SRCREV cache due to cache policy of: %s", srcrev_policy) |
162 | revs = persist_data.persist('BB_URI_HEADREVS', d) | ||
163 | try: | 163 | try: |
164 | bb.fetch.saved_headrevs = pd['BB_URI_HEADREVS'].items() | 164 | bb.fetch.saved_headrevs = revs.items() |
165 | except: | 165 | except: |
166 | pass | 166 | pass |
167 | del pd['BB_URI_HEADREVS'] | 167 | revs.clear() |
168 | else: | 168 | else: |
169 | raise FetchError("Invalid SRCREV cache policy of: %s" % srcrev_policy) | 169 | raise FetchError("Invalid SRCREV cache policy of: %s" % srcrev_policy) |
170 | 170 | ||
@@ -178,8 +178,7 @@ def fetcher_compare_revisions(d): | |||
178 | return true/false on whether they've changed. | 178 | return true/false on whether they've changed. |
179 | """ | 179 | """ |
180 | 180 | ||
181 | pd = bb.persist_data.persist(d) | 181 | data = persist_data.persist('BB_URI_HEADREVS', d).items() |
182 | data = pd['BB_URI_HEADREVS'].items() | ||
183 | data2 = bb.fetch.saved_headrevs | 182 | data2 = bb.fetch.saved_headrevs |
184 | 183 | ||
185 | changed = False | 184 | changed = False |
@@ -756,8 +755,7 @@ class Fetch(object): | |||
756 | if not hasattr(self, "_latest_revision"): | 755 | if not hasattr(self, "_latest_revision"): |
757 | raise ParameterError | 756 | raise ParameterError |
758 | 757 | ||
759 | pd = bb.persist_data.persist(d) | 758 | revs = persist_data.persist('BB_URI_HEADREVS', d) |
760 | revs = pd['BB_URI_HEADREVS'] | ||
761 | key = self.generate_revision_key(url, ud, d) | 759 | key = self.generate_revision_key(url, ud, d) |
762 | try: | 760 | try: |
763 | return revs[key] | 761 | return revs[key] |
@@ -772,8 +770,7 @@ class Fetch(object): | |||
772 | if hasattr(self, "_sortable_revision"): | 770 | if hasattr(self, "_sortable_revision"): |
773 | return self._sortable_revision(url, ud, d) | 771 | return self._sortable_revision(url, ud, d) |
774 | 772 | ||
775 | pd = bb.persist_data.persist(d) | 773 | localcounts = persist_data.persist('BB_URI_LOCALCOUNT', d) |
776 | localcounts = pd['BB_URI_LOCALCOUNT'] | ||
777 | key = self.generate_revision_key(url, ud, d) | 774 | key = self.generate_revision_key(url, ud, d) |
778 | 775 | ||
779 | latest_rev = self._build_revision(url, ud, d) | 776 | latest_rev = self._build_revision(url, ud, d) |