From patchwork Tue Dec 4 01:31:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5/6] sstate.bbclass: fixed file-conflict check Date: Tue, 04 Dec 2012 01:31:14 -0000 From: Martin Jansa X-Patchwork-Id: 40105 Message-Id: <4dcfc906292eba51ed2ca1c326048f27d19560b0.1354584580.git.Martin.Jansa@gmail.com> To: openembedded-core@lists.openembedded.org From: Enrico Scholz The value of subprocess.Popen().communicate()[0] is a string. Checking for '!= None' will always match causing bogus warnings regarding already staged files. Signed-off-by: Enrico Scholz Signed-off-by: Martin Jansa --- meta/classes/sstate.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 6de35e6..967ae9b 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -171,7 +171,7 @@ def sstate_install(ss, d): sstate_search_cmd = "grep -rl %s %s --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}")) cmd_array = sstate_search_cmd.split(' ') search_output = subprocess.Popen(cmd_array, stdout=subprocess.PIPE).communicate()[0] - if search_output != None: + if search_output != "": match.append("Matched in %s" % search_output.rstrip()) if match: bb.warn("The recipe %s is trying to install files into a shared area when those files already exist. Those files and their manifest location are:\n %s\nPlease verify which package should provide the above files." % (d.getVar('PN', True), "\n ".join(match)))