From patchwork Thu Oct 18 22:52:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2] sstate: add manifest info for shared file matches Date: Thu, 18 Oct 2012 22:52:57 -0000 From: Saul Wold X-Patchwork-Id: 38311 Message-Id: <1350600777-2327-1-git-send-email-sgw@linux.intel.com> To: openembedded-core@lists.openembedded.org Present the manifest file that contains the matches for files being installed to a location that already contains that file. This will help to determine which is the correct recipe to fix when this occurs. [YOCTO #3191] Signed-off-by: Saul Wold --- meta/classes/sstate.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index d2a120b..7c00381 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -120,6 +120,7 @@ def sstate_add(ss, source, dest, d): def sstate_install(ss, d): import oe.path + import subprocess sharedfiles = [] shareddirs = [] @@ -164,8 +165,12 @@ def sstate_install(ss, d): break if realmatch: match.append(f) + sstate_search_cmd = "grep -rl %s %s | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}")) + search_output = subprocess.check_output(sstate_search_cmd, stderr=subprocess.STDOUT, shell=True) + if search_output != None: + 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 are:\n %s" % (d.getVar("PN", True), "\n ".join(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))) # Write out the manifest f = open(manifest, "w")