1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 17:24:46 +00:00
This commit is contained in:
deadc0de6
2023-02-27 22:22:07 +01:00
parent 20b0fe940e
commit 61668d3fc8
2 changed files with 15 additions and 2 deletions

View File

@@ -274,37 +274,48 @@ class CfgAggregator:
reloading=reloading, reloading=reloading,
debug=self.debug) debug=self.debug)
self.log.dbg('parsing cfgyaml into cfg_aggregator')
# settings # settings
self.log.dbg('parsing settings')
self.settings = Settings.parse(None, self.cfgyaml.settings) self.settings = Settings.parse(None, self.cfgyaml.settings)
self.key_prefix = self.settings.key_prefix self.key_prefix = self.settings.key_prefix
self.key_separator = self.settings.key_separator self.key_separator = self.settings.key_separator
# dotfiles # dotfiles
self.log.dbg('parsing dotfiles')
self.dotfiles = Dotfile.parse_dict(self.cfgyaml.dotfiles) self.dotfiles = Dotfile.parse_dict(self.cfgyaml.dotfiles)
debug_list('dotfiles', self.dotfiles, self.debug) debug_list('dotfiles', self.dotfiles, self.debug)
# profiles # profiles
self.log.dbg('parsing profiles')
self.profiles = Profile.parse_dict(self.cfgyaml.profiles) self.profiles = Profile.parse_dict(self.cfgyaml.profiles)
debug_list('profiles', self.profiles, self.debug) debug_list('profiles', self.profiles, self.debug)
# actions # actions
self.log.dbg('parsing actions')
self.actions = Action.parse_dict(self.cfgyaml.actions) self.actions = Action.parse_dict(self.cfgyaml.actions)
debug_list('actions', self.actions, self.debug) debug_list('actions', self.actions, self.debug)
# trans_r # trans_r
self.log.dbg('parsing trans_r')
self.trans_r = Transform.parse_dict(self.cfgyaml.trans_r) self.trans_r = Transform.parse_dict(self.cfgyaml.trans_r)
debug_list('trans_r', self.trans_r, self.debug) debug_list('trans_r', self.trans_r, self.debug)
# trans_w # trans_w
self.log.dbg('parsing trans_w')
self.trans_w = Transform.parse_dict(self.cfgyaml.trans_w) self.trans_w = Transform.parse_dict(self.cfgyaml.trans_w)
debug_list('trans_w', self.trans_w, self.debug) debug_list('trans_w', self.trans_w, self.debug)
# variables # variables
self.log.dbg('parsing variables')
self.variables = self.cfgyaml.variables self.variables = self.cfgyaml.variables
debug_dict('variables', self.variables, self.debug) debug_dict('variables', self.variables, self.debug)
self.log.dbg('enrich variables')
self._enrich_variables() self._enrich_variables()
self.log.dbg('patch keys...')
# patch dotfiles in profiles # patch dotfiles in profiles
self._patch_keys_to_objs(self.profiles, self._patch_keys_to_objs(self.profiles,
"dotfiles", self.get_dotfile) "dotfiles", self.get_dotfile)
@@ -333,6 +344,8 @@ class CfgAggregator:
self._get_trans_w_args(self.get_trans_w), self._get_trans_w_args(self.get_trans_w),
islist=False) islist=False)
self.log.dbg('done parsing cfgyaml into cfg_aggregator')
def _enrich_variables(self): def _enrich_variables(self):
""" """
enrich available variables enrich available variables

View File

@@ -256,7 +256,7 @@ class CfgYaml:
# process imported variables (import_variables) # process imported variables (import_variables)
newvars = self._import_variables() newvars = self._import_variables()
self._clear_profile_vars(newvars) self._clear_profile_vars(newvars)
self._add_variables(newvars) self._add_variables(newvars, prio=True)
# process imported actions (import_actions) # process imported actions (import_actions)
self._import_actions() self._import_actions()
@@ -1042,7 +1042,7 @@ class CfgYaml:
if dvar.keys(): if dvar.keys():
self._shell_exec_dvars(merged, keys=dvar.keys()) self._shell_exec_dvars(merged, keys=dvar.keys())
self._clear_profile_vars(merged) self._clear_profile_vars(merged)
newvars = self._merge_dict(newvars, merged) newvars = self._merge_dict(merged, newvars)
if self._debug: if self._debug:
self._debug_dict('imported variables', newvars) self._debug_dict('imported variables', newvars)
return newvars return newvars