@@ -31,6 +31,7 @@ class SystemdFile():
def __init__(self, root, path, instance_unit_name):
self.sections = dict()
+ print(f"Parsing unit: {path}", file=sys.stderr)
self._parse(root, path)
dirname = os.path.basename(path.name) + ".d"
for location in locations:
@@ -39,6 +40,7 @@ class SystemdFile():
inst_dirname = instance_unit_name + ".d"
files = chain(files, (root / location / "system" / inst_dirname).glob("*.conf"))
for path2 in sorted(files):
+ print(f"Parsing unit's override: {path2}", file=sys.stderr)
self._parse(root, path2)
def _parse(self, root, path):
@@ -88,6 +90,11 @@ class SystemdFile():
# forget all preceding assignments. This works because we are
# processing files in correct parse order.
if k in self._clearable_keys and not v:
+ print(
+ f"The directive '{k}' is empty, therefore the values '{section[k]}' "
+ "are going to be discarded",
+ file=sys.stderr,
+ )
del section[k]
continue