]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: fixed file-conflict check
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Fri, 16 Nov 2012 17:14:20 +0000 (18:14 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Dec 2012 15:33:35 +0000 (15:33 +0000)
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 <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index 6de35e6dc9ef15f16c75ec2f723f109e42f713f6..967ae9b55919883986146774c30f23d749e71b1e 100644 (file)
@@ -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)))