summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-07 18:10:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 12:52:56 +0100
commitcd7b7de91a98e712e796a8d6a3a8e3741950396e (patch)
tree95000aaf4bb02955498b5e2412ec215d90b1be10 /bitbake
parent534c4d0f1e287d0ac82504b273a5497d3457582a (diff)
downloadpoky-cd7b7de91a98e712e796a8d6a3a8e3741950396e.tar.gz
bitbake: fetch2: Fix AUTOINC handling
AUTOINC was meant to appear once at the start of the version string. The list of names may not be sorted meaning it could get inserted in the middle. This patch simplifies the code and ensures it appears at the start. Include cache version bump to ensure the cache picks up these changes. (Bitbake rev: ad8bf10d873abb94d987860a3f6d06b134fb8a99) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py2
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index eee83b7d09..fb0f40c602 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -43,7 +43,7 @@ except ImportError:
43 logger.info("Importing cPickle failed. " 43 logger.info("Importing cPickle failed. "
44 "Falling back to a very slow implementation.") 44 "Falling back to a very slow implementation.")
45 45
46__cache_version__ = "145" 46__cache_version__ = "146"
47 47
48def getCacheFile(path, filename, data_hash): 48def getCacheFile(path, filename, data_hash):
49 return os.path.join(path, filename + "." + data_hash) 49 return os.path.join(path, filename + "." + data_hash)
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 1988dc760d..1365335330 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -638,12 +638,12 @@ def get_srcrev(d):
638 ud = urldata[scm] 638 ud = urldata[scm]
639 for name in ud.names: 639 for name in ud.names:
640 autoinc, rev = ud.method.sortable_revision(scm, ud, d, name) 640 autoinc, rev = ud.method.sortable_revision(scm, ud, d, name)
641 seenautoinc = seenautoinc or autoinc
641 if len(rev) > 10: 642 if len(rev) > 10:
642 rev = rev[:10] 643 rev = rev[:10]
643 if autoinc and not seenautoinc:
644 rev = "AUTOINC+" + rev
645 seenautoinc = True
646 format = format.replace(name, rev) 644 format = format.replace(name, rev)
645 if seenautoinc:
646 format = "AUTOINC+" + format
647 647
648 return format 648 return format
649 649