Description: Try all URLs to find newest kernel version.
Author: Johann Felix Soden <johfel@debian.org>

---
 ketchup |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

--- a/ketchup
+++ b/ketchup
@@ -374,7 +374,7 @@
 def latest_dir(url, pat):
     """Find the latest link matching pat at url after sorting"""
     p = []
-    url = url % { "kernel_url": kernel_url }
+    url = url % { "kernel_url": kernel_url, "revbase":"" }
     for l in urllib.urlopen(url).readlines():
         m = re.search('"%s"' % pat, l)
         if m: p.append(m.group(1))
@@ -742,11 +742,12 @@
     if ver in version_info.keys():
         v = version_info[ver]
         d = v[1]
-        if type(d) is type([]):
-            d = d[0]
-        for n in range(5):
-            return v[0](os.path.dirname(d), v[2])
-            error('retrying version lookup for %s' % ver)
+        if not type(d) is type([]):
+            d = [d]
+        for n in d:
+            r = v[0](os.path.dirname(n), v[2])
+            if r:
+                return r
     else:
         return ver
 
