-python do_generate_weston_init() {
- with open(d.getVar('WORKDIR', True)+"/weston.ini" ,'w') as weston_ini:
- dicoSection=d.getVarFlags('WESTONSECTION')
- keysSection=list(dicoSection.keys())
- keysSection.sort()
- for section in keysSection:
- weston_ini.writelines( "["+dicoSection[section]+"]\n")
- dicoSectionValues=d.getVarFlags(section)
- keysSectionValues=list(dicoSectionValues.keys())
- keysSectionValues.sort()
- for sectionValue in keysSectionValues:
- if (dicoSection[section] == "output" and sectionValue == "agl_screen"):
- screen=dicoSectionValues[sectionValue]
- dicoScreenConfig=d.getVarFlags(screen)
- keysScreenConfig=list(dicoScreenConfig.keys())
- keysScreenConfig.sort()
- for screenConfig in keysScreenConfig:
- weston_ini.writelines( screenConfig+"="+dicoScreenConfig[screenConfig]+"\n")
- else:
- weston_ini.writelines( str(sectionValue)+"="+str(dicoSectionValues[sectionValue])+"\n")