This modified regular expression allows systemd instance strings (the
string between @ and .service) to contains dots, which is useful for
file names which contain dots. The previous regular expression would
stop matching at the first dot, while this expression stops matching at
the last dot.

Signed-off-by: Jonatan Pålsson <[email protected]>
---
 meta/classes/systemd.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index d56c760..9131b82 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -151,7 +151,7 @@ python systemd_populate_packages() {
                 # '[email protected]'
                 base = None
                 if service.find('@') != -1:
-                    base = re.sub('@[^.]+.', '@.', service)
+                    base = re.sub("@.*\.(?=[^.]*$)", '@.', service)
 
                 for path in searchpaths:
                     if os.path.exists(oe.path.join(d.getVar("D", True), path, 
service)):
-- 
2.10.2

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to