libcmds: create directory before open in case it is not there
This could happen if you use kas to checkout repos that do not contain the directory. i.e. repos that are not actually bb layers Signed-off-by: Henning Schild <henning.schild@siemens.com>
This commit is contained in:
		
				
					committed by
					
						 Daniel Wagner
						Daniel Wagner
					
				
			
			
				
	
			
			
			
						parent
						
							19e518cd25
						
					
				
				
					commit
					4140961b11
				
			| @@ -169,6 +169,8 @@ class WriteConfig(Command): | ||||
|     def execute(self, config): | ||||
|         def _write_bblayers_conf(config): | ||||
|             filename = config.build_dir + '/conf/bblayers.conf' | ||||
|             if not os.path.isdir(os.path.dirname(filename)): | ||||
|                 os.makedirs(os.path.dirname(filename)) | ||||
|             with open(filename, 'w') as fds: | ||||
|                 fds.write(config.get_bblayers_conf_header()) | ||||
|                 fds.write('BBLAYERS ?= " \\\n    ') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user