Skip to contentSkip to conversation

siteinfo: add existiance check for site config file

PATCH In review Saul Wold 2 participants 3 messages May 23, 2013

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 siteinfo: add existiance check for site config file

There is a condition where ncurses adds a site config file to CONFIG_SITE list and then binutils configure tries to use the siteinfo list before ncurses has installed the file. The existance test is there in the BBPATH search, but not in the SYSROOTCACHE check, so add it here.

---
 meta/classes/siteinfo.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/siteinfo.bbclass +2 -1
index 09f88c6..87a4225 100644
@@ -139,7 +139,8 @@ def siteinfo_get_files(d, no_cache = False):
     if os.path.isdir(path_siteconfig):
         for i in os.listdir(path_siteconfig):
             filename = os.path.join(path_siteconfig, i)
-            sitefiles += filename + " "
+            if os.path.exists(filename):
+                sitefiles += filename + " "
 
     return sitefiles
 
Signature · 1 line
1.8.1.4
author
#1 lore raw

Ignore this patch, I was quick on the draw and did not notice the listdir which means the file is there,

Sau!

Quoted 25 lines · Saul Wold

There is a condition where ncurses adds a site config file to CONFIG_SITE list and then binutils configure tries to use the siteinfo list before ncurses has installed the file. The existance test is there in the BBPATH search, but not in the SYSROOTCACHE check, so add it here.

---
  meta/classes/siteinfo.bbclass | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/siteinfo.bbclass +2 -1
index 09f88c6..87a4225 100644
@@ -139,7 +139,8 @@ def siteinfo_get_files(d, no_cache = False):
      if os.path.isdir(path_siteconfig):
          for i in os.listdir(path_siteconfig):
              filename = os.path.join(path_siteconfig, i)
-            sitefiles += filename + " "
+            if os.path.exists(filename):
+                sitefiles += filename + " "
 
      return sitefiles
 
#2 lore raw
Quoted 4 lines · Saul Wold

Ignore this patch, I was quick on the draw and did not notice the listdir which means the file is there,

Could the issue be that the file -was- there, then we ncurses updated it and now it's no longer there? (or in the process of being written?)

I've definitely seen this failure before.. so there is some kind of race.

--Mark

Quoted 33 lines

Sau!

Quoted 16 lines · Saul Wold

There is a condition where ncurses adds a site config file to CONFIG_SITE list and then binutils configure tries to use the siteinfo list before ncurses has installed the file. The existance test is there in the BBPATH search, but not in the SYSROOTCACHE check, so add it here.

---
   meta/classes/siteinfo.bbclass | 3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/siteinfo.bbclass +0 -0
index 09f88c6..87a4225 100644

meta/classes/siteinfo.bbclass def siteinfo_get_files(d, no_cache = False): · line 146

Quoted 9 lines
meta/classes/siteinfo.bbclass +2 -1
@@ -139,7 +139,8 @@ def siteinfo_get_files(d, no_cache = False):
       if os.path.isdir(path_siteconfig):
           for i in os.listdir(path_siteconfig):
               filename = os.path.join(path_siteconfig, i)
-            sitefiles += filename + " "
+            if os.path.exists(filename):
+                sitefiles += filename + " "
 
       return sitefiles
 

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core