Skip to contentSkip to conversation

buildhistory/distrodata: Adapt to updated fetcher API

PATCH New Richard Purdie 1 participant 1 message Nov 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 buildhistory/distrodata: Adapt to updated fetcher API

The buildhistory code has fallback paths for older bitbakes for now. The distrodata class is much less used and it can be assumed a recent bitbake is used in that case rather than adding fallback code.

---
[Bitbake changes aren't in yet, this is to prepare for them]

meta/classes/buildhistory.bbclass +5 -1
index 3da03c8..ec3f0b1 100644
@@ -572,7 +572,11 @@ def _get_srcrev_values(d):
     for scm in scms:
         ud = urldata[scm]
         for name in ud.names:
-            rev = ud.method.sortable_revision(scm, ud, d, name)
+            try:
+                rev = ud.method.sortable_revision(ud, d, name)
+            except TypeError:
+                # support old bitbake versions
+                rev = ud.method.sortable_revision(scm, ud, d, name)
             # Clean this up when we next bump bitbake version
             if type(rev) != str:
                 autoinc, rev = rev
meta/classes/distrodata.bbclass +1 -1
index e481027..2c365f9 100644
@@ -756,7 +756,7 @@ python do_checkpkg() {
                 svnFetcher = bb.fetch2.svn.Svn(d)
                 svnFetcher.urldata_init(ud, d)
                 try:
-                        pupver = svnFetcher.latest_revision(uri, ud, d, ud.names[0])
+                        pupver = svnFetcher.latest_revision(ud, d, ud.names[0])
                 except bb.fetch2.FetchError:
                         pstatus = "ErrSvnAccess"