]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
Allow to conditionally implement sortable revision in the fetcher
authorHolger Hans Peter Freyther <zecke@selfish.org>
Sun, 12 Oct 2008 22:14:07 +0000 (22:14 +0000)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Sun, 12 Oct 2008 22:14:07 +0000 (22:14 +0000)
lib/bb/fetch/__init__.py

index 8578dc77f80dd93ce2ed4739341e62c62f0428b1..c9b589e0415bb4a12f14d29abbca9b0efd812963 100644 (file)
@@ -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)