]> code.ossystems Code Review - openembedded-core.git/commitdiff
base: Fix license checksum rebuild problems
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 1 Jun 2015 21:13:23 +0000 (22:13 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 1 Jun 2015 21:18:14 +0000 (22:18 +0100)
"MACHINE=qemux86-64 bitbake init-ifupdown; MACHINE=genericx86-64 bitbake init-ifupdown"
shows a rebuild when it would be expected. The reason is a LIC_FILES_CHKSUM which
contains file://${WORKDIR}, an absolute path which doesn't exist in the first build
but does in the second, causing a signature change and a rebuild.

Fix the problem by ignoring any file:// url which resolves since TMPDIR for
license file dependency purposes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass

index 2822a688f24d987e6f8d6c8efebc323dba42ec05..8637f9ffd6200b9eeea27c2b2089b031a414e684 100644 (file)
@@ -97,6 +97,7 @@ PATH_prepend = "${@extra_path_elements(d)}"
 def get_lic_checksum_file_list(d):
     filelist = []
     lic_files = d.getVar("LIC_FILES_CHKSUM", True) or ''
+    tmpdir = d.getVar("TMPDIR", True)
 
     urls = lic_files.split()
     for url in urls:
@@ -105,6 +106,8 @@ def get_lic_checksum_file_list(d):
         try:
             path = bb.fetch.decodeurl(url)[2]
             if path[0] == '/':
+                if path.startswith(tmpdir):
+                    continue
                 filelist.append(path + ":" + str(os.path.exists(path)))
         except bb.fetch.MalformedUrl:
             raise bb.build.FuncFailed(d.getVar('PN', True) + ": LIC_FILES_CHKSUM contains an invalid URL: " + url)