Patchwork sstate.bbclass: fixed file-conflict check

login
register
mail settings
Submitter Enrico Scholz
Date Nov. 16, 2012, 5:14 p.m.
Message ID <1353086060-31563-1-git-send-email-enrico.scholz@sigma-chemnitz.de>
Download mbox | patch
Permalink /patch/39167/
State Accepted
Commit acdd76482efc3caf80e9e0b7359be7ca724ae09a
Headers show

Comments

Enrico Scholz - Nov. 16, 2012, 5:14 p.m.
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>
---
 meta/classes/sstate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 1730abe..0ee48db 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -173,7 +173,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)))