From cd7b7de91a98e712e796a8d6a3a8e3741950396e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 7 Jun 2013 18:10:36 +0100 Subject: 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 --- bitbake/lib/bb/fetch2/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb/fetch2') 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): ud = urldata[scm] for name in ud.names: autoinc, rev = ud.method.sortable_revision(scm, ud, d, name) + seenautoinc = seenautoinc or autoinc if len(rev) > 10: rev = rev[:10] - if autoinc and not seenautoinc: - rev = "AUTOINC+" + rev - seenautoinc = True format = format.replace(name, rev) + if seenautoinc: + format = "AUTOINC+" + format return format -- cgit v1.2.3-54-g00ecf