diff --git a/src/oebuild/local_conf.py b/src/oebuild/local_conf.py index a17c0dde0915318e56886ceeb76391bb6585e492..4eed6a2c769fc73f056823ae80a523cad6be919b 100644 --- a/src/oebuild/local_conf.py +++ b/src/oebuild/local_conf.py @@ -107,6 +107,12 @@ class LocalConf: with open(local_conf_path, 'r', encoding='utf-8') as r_f: self.content = r_f.read() + def __del__(self): + # The local file specifies that each line cannot start with a space. + # Therefore, after each modification to the local file, the spaces at + # the beginning of lines that start with spaces are removed. + os.system(rf"sed -i 's/^ \+//' {self.local_path}") + def update(self, compile_param: CompileParam, src_dir=None): ''' update local.conf by ParseCompile