]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
[fetch] Always add PN to the _revision_key we get from the fetcher
authorHolger Hans Peter Freyther <zecke@selfish.org>
Mon, 13 Oct 2008 12:54:01 +0000 (12:54 +0000)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Mon, 13 Oct 2008 12:54:01 +0000 (12:54 +0000)
    This is extending r1101 to always append something to the
    _revision_key of the fetcher. alphaone spotted that it was missing
    for the latest_revision case.

lib/bb/fetch/__init__.py

index c9b589e0415bb4a12f14d29abbca9b0efd812963..99f4b582146a0585904382597f30bba4b167c0ea 100644 (file)
@@ -502,7 +502,7 @@ class Fetch(object):
             raise ParameterError
 
         pd = persist_data.PersistData(d)
-        key = self._revision_key(url, ud, d)
+        key = self.generate_revision_key(url, ud, d)
         rev = pd.getValue("BB_URI_HEADREVS", key)
         if rev != None:
             return str(rev)
@@ -525,8 +525,7 @@ class Fetch(object):
         
 
         pd = persist_data.PersistData(d)
-        key = self._revision_key(url, ud, d)
-        key = "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
+        key = self.generate_revision_key(url, ud, d)
 
         latest_rev = self._build_revision(url, ud, d)
         last_rev = pd.getValue("BB_URI_LOCALCOUNT", key + "_rev")
@@ -545,6 +544,9 @@ class Fetch(object):
 
         return str(count + "+" + latest_rev)
 
+    def generate_revision_key(self, url, ud, d):
+        key = self._revision_key(url, ud, d)
+        return "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
 
 import cvs
 import git