Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] systemd: Add partial support of drop-in configuration files to systemd-systemctl-native script
@ 2019-07-25 19:18 Frederic Ouellet
  2019-07-25 19:31 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Frederic Ouellet @ 2019-07-25 19:18 UTC (permalink / raw)
  To: openembedded-core

Support for serive-name.service.d/ folders containing .conf files
It don't support all the partial folder names

See https://www.freedesktop.org/software/systemd/man/systemd.unit.html

Signed-off-by: Frederic Ouellet <fredericouellet@eaton.com>
---
 meta/recipes-core/systemd/systemd-systemctl/systemctl | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 8d7b3ba..8837f54 100755
--- a/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -28,6 +28,10 @@ class SystemdFile():
     def __init__(self, root, path):
         self.sections = dict()
         self._parse(root, path)
+        dirname = os.path.basename(path.name) + ".d"
+        for location in locations:
+            for path2 in sorted((root / location / "system" / dirname).glob("*.conf")):                
+                self._parse(root, path2)
 
     def _parse(self, root, path):
         """Parse a systemd syntax configuration file
@@ -56,8 +60,11 @@ class SystemdFile():
                 line = line.rstrip("\n")
                 m = section_re.match(line)
                 if m:
-                    section = dict()
-                    self.sections[m.group('section')] = section
+                    if m.group('section') not in self.sections:
+                        section = dict()
+                        self.sections[m.group('section')] = section
+                    else:
+                        section = self.sections[m.group('section')]
                     continue
 
                 while line.endswith("\\"):
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ patchtest: failure for systemd: Add partial support of drop-in configuration files to systemd-systemctl-native script
  2019-07-25 19:18 [PATCH] systemd: Add partial support of drop-in configuration files to systemd-systemctl-native script Frederic Ouellet
@ 2019-07-25 19:31 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2019-07-25 19:31 UTC (permalink / raw)
  To: Frederic Ouellet; +Cc: openembedded-core

== Series Details ==

Series: systemd: Add partial support of drop-in configuration files to systemd-systemctl-native script
Revision: 1
URL   : https://patchwork.openembedded.org/series/18897/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            systemd: Add partial support of drop-in configuration files to systemd-systemctl-native script
 Issue             Commit shortlog is too long [test_shortlog_length] 
  Suggested fix    Edit shortlog so that it is 90 characters or less (currently 94 characters)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-25 19:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-25 19:18 [PATCH] systemd: Add partial support of drop-in configuration files to systemd-systemctl-native script Frederic Ouellet
2019-07-25 19:31 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox