* [PATCH] base: Fix license checksum rebuild problems
@ 2015-06-01 21:13 Richard Purdie
2015-06-15 16:05 ` Christopher Larson
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2015-06-01 21:13 UTC (permalink / raw)
To: openembedded-core
"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>
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 99b512b..7093a19 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] base: Fix license checksum rebuild problems
2015-06-01 21:13 [PATCH] base: Fix license checksum rebuild problems Richard Purdie
@ 2015-06-15 16:05 ` Christopher Larson
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Larson @ 2015-06-15 16:05 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]
On Mon, Jun 1, 2015 at 2:13 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> "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>
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 99b512b..7093a19 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -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
>
Hmm, this would probably never be a real issue, but this is using a string
startswith() without a path separator, meaning it’d match e.g.
/path/to/tmpfoo/ as well as /path/to/tmp/ :)
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 2481 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-15 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 21:13 [PATCH] base: Fix license checksum rebuild problems Richard Purdie
2015-06-15 16:05 ` Christopher Larson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.