Skip to contentSkip to conversation

populate_sdk_ext.bbclass: Include site.conf in parsing for contents for local.conf

PATCH New Khem Raj 1 participant 1 message Dec 20, 2018

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 populate_sdk_ext.bbclass: Include site.conf in parsing for contents for local.conf

Some distros use site.conf to emit certain variables which are important for eSDK e.g. DISTRO with out which eSDK will not be able to ger right metadata when it tries to build

---
 meta/classes/populate_sdk_ext.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/populate_sdk_ext.bbclass +5 -0
index e30c49296d..40b0375e0b 100644
@@ -280,6 +280,8 @@ python copy_buildsystem () {
 
     # Create local.conf
     builddir = d.getVar('TOPDIR')
+    if derivative and os.path.exists(builddir + '/conf/site.conf'):
+        shutil.copyfile(builddir + '/conf/site.conf', baseoutpath + '/conf/site.conf')
     if derivative and os.path.exists(builddir + '/conf/auto.conf'):
         shutil.copyfile(builddir + '/conf/auto.conf', baseoutpath + '/conf/auto.conf')
     if derivative:
@@ -297,6 +299,9 @@ python copy_buildsystem () {
                 return origvalue, op, 0, True
         varlist = ['[^#=+ ]*']
         oldlines = []
+        if os.path.exists(builddir + '/conf/site.conf'):
+            with open(builddir + '/conf/site.conf', 'r') as f:
+                oldlines += f.readlines()
         if os.path.exists(builddir + '/conf/auto.conf'):
             with open(builddir + '/conf/auto.conf', 'r') as f:
                 oldlines += f.readlines()
Signature · 1 line
2.20.1