Skip to contentSkip to conversation

sstate: Add detail to shared area warning

PATCH In review Saul Wold 5 participants 8 messages Oct 2, 2012 – Oct 3, 2012

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 sstate: Add detail to shared area warning

[YOCTO #3191]

---
 meta/classes/sstate.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/sstate.bbclass +1 -1
index 03f083e..ca50483 100644
@@ -158,7 +158,7 @@ def sstate_install(ss, d):
             if realmatch:
                 match.append(f)
     if match:
-        bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n   %s" % "\n   ".join(match))
+        bb.warn("The %s recipe is trying to install files into a shared area when those files already exist (please fix %s). Those files are:\n   %s" % (d.getVar('PN', True), d.getVar('FILE', True), "\n   ".join(match)))
 
     # Write out the manifest
     f = open(manifest, "w")
Signature · 1 line
1.7.9.5
#1 lore raw

meta/classes/sstate.bbclass def sstate_install(ss, d): · line 161

Quoted 2 lines · Saul Wold
meta/classes/sstate.bbclass +1 -1
-        bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n   %s" % "\n   ".join(match))
+        bb.warn("The %s recipe is trying to install files into a shared area when those files already exist (please fix %s). Those files are:\n   %s" % (d.getVar('PN', True), d.getVar('FILE', True), "\n   ".join(match)))

That seems potentially misleading: the file that needs fixing isn't necessarily the one that triggers this warning. What would be ideal would be to have it output the names of all recipes that have tried to stage the files in question so that the user can make an informed decision about which one ought to be putting them there.

p.

author
#2 lore raw
Quoted 10 lines · Phil Blundell

meta/classes/sstate.bbclass def sstate_install(ss, d): · line 161

Quoted 2 lines · Saul Wold
meta/classes/sstate.bbclass +1 -1
-        bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n   %s" % "\n   ".join(match))
+        bb.warn("The %s recipe is trying to install files into a shared area when those files already exist (please fix %s). Those files are:\n   %s" % (d.getVar('PN', True), d.getVar('FILE', True), "\n   ".join(match)))

That seems potentially misleading: the file that needs fixing isn't necessarily the one that triggers this warning. What would be ideal would be to have it output the names of all recipes that have tried to stage the files in question so that the user can make an informed decision about which one ought to be putting them there.

True enough, but we don't have that information at that time, but it gives more information than we had before, as to which recipe was adding the files, I guess if I change the wording to something like "verify" or "check"?

Sau!

Quoted 5 lines

p.

#3 lore raw
Quoted 11 lines · Saul Wold
Quoted 10 lines · Phil Blundell

meta/classes/sstate.bbclass def sstate_install(ss, d): · line 161

Quoted 2 lines · Saul Wold
meta/classes/sstate.bbclass +1 -1
-        bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n   %s" % "\n   ".join(match))
+        bb.warn("The %s recipe is trying to install files into a shared area when those files already exist (please fix %s). Those files are:\n   %s" % (d.getVar('PN', True), d.getVar('FILE', True), "\n   ".join(match)))

That seems potentially misleading: the file that needs fixing isn't necessarily the one that triggers this warning. What would be ideal would be to have it output the names of all recipes that have tried to stage the files in question so that the user can make an informed decision about which one ought to be putting them there.

Quoted 4 lines

True enough, but we don't have that information at that time, but it gives more information than we had before, as to which recipe was adding the files, I guess if I change the wording to something like "verify" or "check"?

Yeah, sounds good.

p.

#4 lore raw
In reply to Phil Blundell
Quoted 9 lines · Phil Blundell

meta/classes/sstate.bbclass def sstate_install(ss, d): · line 161

Quoted 2 lines · Saul Wold
meta/classes/sstate.bbclass +1 -1
-        bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n   %s" % "\n   ".join(match))
+        bb.warn("The %s recipe is trying to install files into a shared area when those files already exist (please fix %s). Those files are:\n   %s" % (d.getVar('PN', True), d.getVar('FILE', True), "\n   ".join(match)))

That seems potentially misleading: the file that needs fixing isn't necessarily the one that triggers this warning. What would be ideal would be to have it output the names of all recipes that have tried to stage the files in question so that the user can make an informed decision about which one ought to be putting them there.

Maybe something like master.list was before
http://git.openembedded.org/openembedded-core/commit/?id=603daf343ad3f18c8adb799e3625ae2a18d94f56
with added recipe name, but that doesn't detect files already stored in sysroot directly from do_configure/do_compile etc like RP suspects python recipe is doing in this case.

And yes it does, to use that to compile own extensions later.

do_compile:

        install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
        install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
        install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
        install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/

..

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#5 lore raw
Quoted 11 lines · Martin Jansa
Quoted 9 lines · Phil Blundell

meta/classes/sstate.bbclass def sstate_install(ss, d): · line 161

Quoted 2 lines · Saul Wold
meta/classes/sstate.bbclass +1 -1
-        bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n   %s" % "\n   ".join(match))
+        bb.warn("The %s recipe is trying to install files into a shared area when those files already exist (please fix %s). Those files are:\n   %s" % (d.getVar('PN', True), d.getVar('FILE', True), "\n   ".join(match)))

That seems potentially misleading: the file that needs fixing isn't necessarily the one that triggers this warning. What would be ideal would be to have it output the names of all recipes that have tried to stage the files in question so that the user can make an informed decision about which one ought to be putting them there.

Quoted 3 lines

Maybe something like master.list was before
http://git.openembedded.org/openembedded-core/commit/?id=603daf343ad3f18c8adb799e3625ae2a18d94f56
with added recipe name, but that doesn't detect files already

We can list any sstate manifest files (tmp/sstate-control) also adding that file which may or may not have a listing of it. We might as well just grep those files and print matches.

We are not going back to a master.list file, its a performance headache.

Cheers,

Richard

#6 lore raw
Quoted 16 lines · Richard Purdie
Quoted 11 lines · Martin Jansa
Quoted 9 lines · Phil Blundell

meta/classes/sstate.bbclass def sstate_install(ss, d): · line 161

Quoted 2 lines · Saul Wold
meta/classes/sstate.bbclass +1 -1
-        bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n   %s" % "\n   ".join(match))
+        bb.warn("The %s recipe is trying to install files into a shared area when those files already exist (please fix %s). Those files are:\n   %s" % (d.getVar('PN', True), d.getVar('FILE', True), "\n   ".join(match)))

That seems potentially misleading: the file that needs fixing isn't necessarily the one that triggers this warning. What would be ideal would be to have it output the names of all recipes that have tried to stage the files in question so that the user can make an informed decision about which one ought to be putting them there.

Quoted 3 lines

Maybe something like master.list was before
http://git.openembedded.org/openembedded-core/commit/?id=603daf343ad3f18c8adb799e3625ae2a18d94f56
with added recipe name, but that doesn't detect files already

Quoted 5 lines

We can list any sstate manifest files (tmp/sstate-control) also adding that file which may or may not have a listing of it. We might as well just grep those files and print matches.

We are not going back to a master.list file, its a performance headache.

I had to do this manually recently, so this error would be very useful ;)

-M

#7 lore raw
In reply to Phil Blundell
Quoted 9 lines · Phil Blundell

meta/classes/sstate.bbclass def sstate_install(ss, d): · line 161

Quoted 2 lines · Saul Wold
meta/classes/sstate.bbclass +1 -1
-        bb.warn("The recipe is trying to install files into a shared area when those files already exist. Those files are:\n   %s" % "\n   ".join(match))
+        bb.warn("The %s recipe is trying to install files into a shared area when those files already exist (please fix %s). Those files are:\n   %s" % (d.getVar('PN', True), d.getVar('FILE', True), "\n   ".join(match)))

That seems potentially misleading: the file that needs fixing isn't necessarily the one that triggers this warning. What would be ideal would be to have it output the names of all recipes that have tried to stage the files in question so that the user can make an informed decision about which one ought to be putting them there.

*if* you can get that information. The python recipe is poking things into the sysroot outside the knowledge of sstate, then triggering a warning. We have no way to know who put files there if it wasn't done through sstate.

This isn't to say we shouldn't improve the message and use the sstate manifests to find any culprits, just that we can't find an answer in all cases.

Cheers,

Richard