From 6265ab521627a38b9b0596149e31119b2073f5ba Mon Sep 17 00:00:00 2001 From: pieterg Date: Thu, 3 Jun 2010 11:13:42 +0200 Subject: [PATCH] allow BB_LOCALCOUNT_OVERRIDE to be defined per package --- lib/bb/fetch/__init__.py | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py index 085f864..a586fda 100644 --- a/lib/bb/fetch/__init__.py +++ b/lib/bb/fetch/__init__.py @@ -695,7 +695,8 @@ class Fetch(object): latest_rev = self._build_revision(url, ud, d) last_rev = pd.getValue("BB_URI_LOCALCOUNT", key + "_rev") - uselocalcount = bb.data.getVar("BB_LOCALCOUNT_OVERRIDE", d, True) or False + pn = bb.data.getVar("PN", d, True) + uselocalcount = bb.data.getVar("BB_LOCALCOUNT_OVERRIDE_pn-%s" % pn, d, True) or bb.data.getVar("BB_LOCALCOUNT_OVERRIDE", d, True) or False count = None if uselocalcount: count = Fetch.localcount_internal_helper(ud, d) @@ -705,9 +706,10 @@ class Fetch(object): if last_rev == latest_rev: return str(count + "+" + latest_rev) - buildindex_provided = hasattr(self, "_sortable_buildindex") - if buildindex_provided: - count = self._sortable_buildindex(url, ud, d, latest_rev) + if not uselocalcount: + buildindex_provided = hasattr(self, "_sortable_buildindex") + if buildindex_provided: + count = self._sortable_buildindex(url, ud, d, latest_rev) if count is None: count = "0" -- 1.6.5.rc1.44.ga1675