summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2012-10-18 12:25:05 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-27 09:44:58 +0100
commit6ec5640e59e57d894da4e67fb56d69d8fdfee2ab (patch)
tree2e4cda6aeb3bcc822f1c0e72e273ab0c84aa4661 /meta/classes
parent115076c0d8fa0e9f100136b8f060e59d978c4fca (diff)
downloadpoky-6ec5640e59e57d894da4e67fb56d69d8fdfee2ab.tar.gz
sstate: add manifest info for shared file matches
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] (From OE-Core rev: 56268f6e4ed1fc11143173bb1717a8be78c728a5) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index dee84bf391..cbb14e1177 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -116,6 +116,7 @@ def sstate_add(ss, source, dest, d):
116 116
117def sstate_install(ss, d): 117def sstate_install(ss, d):
118 import oe.path 118 import oe.path
119 import subprocess
119 120
120 sharedfiles = [] 121 sharedfiles = []
121 shareddirs = [] 122 shareddirs = []
@@ -163,8 +164,13 @@ def sstate_install(ss, d):
163 break 164 break
164 if realmatch: 165 if realmatch:
165 match.append(f) 166 match.append(f)
167 sstate_search_cmd = "grep -rl %s %s --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}"))
168 cmd_array = sstate_search_cmd.split(' ')
169 search_output = subprocess.Popen(cmd_array, stdout=subprocess.PIPE).communicate()[0]
170 if search_output != None:
171 match.append("Matched in %s" % search_output.rstrip())
166 if match: 172 if match:
167 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))) 173 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)))
168 174
169 # Write out the manifest 175 # Write out the manifest
170 f = open(manifest, "w") 176 f = open(manifest, "w")