From: Holger Hans Peter Freyther Date: Sun, 12 Oct 2008 22:14:07 +0000 (+0000) Subject: Allow to conditionally implement sortable revision in the fetcher X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33d4bb2864920e7ddb3fb8f47dbeb5ac95b7f44e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git Allow to conditionally implement sortable revision in the fetcher --- diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py index 8578dc77f80..c9b589e0415 100644 --- a/lib/bb/fetch/__init__.py +++ b/lib/bb/fetch/__init__.py @@ -515,8 +515,14 @@ class Fetch(object): """ """ - if hasattr(self, "_sortable_revision"): + has_want_sortable = hasattr(self, "_want_sortable_revision") + has_sortable = hasattr(self, "_sortable_revision") + + if not has_want_sortable and has_sortable: + return self._sortable_revision(url, ud, d) + elif has_want_sortable and self._want_sortable_revision(url, ud, d) and has_sortable: return self._sortable_revision(url, ud, d) + pd = persist_data.PersistData(d) key = self._revision_key(url, ud, d)