| Summary: |
SystemD unit file that is UTF-8 encoded causes uncaught exception in SYSTEMD_SERVICE postinst |
| Product: |
[Build System, Metadata & Runtime] OE-Core
|
Reporter: |
martin.scheffler |
| Component: |
oe-core other | Assignee: |
martin.scheffler |
| Status: |
RESOLVED
WORKSFORME
|
QA Contact: |
|
| Severity: |
normal
|
|
|
| Priority: |
Medium+
|
CC: |
JPEWhacker, randy.macleod
|
| Version: |
4.0.16 | |
|
| Target Milestone: |
4.0.20 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
No (bug/feature does not impact docs)
|
I have a UTF-8 encoded SystemD unit file that I want to autostart with SYSTEMD_SERVICE:${PN} = "my.service" This causes the following exception: Traceback (most recent call last): File "/build/lmp/build-lmp/tmp-lmp/work/intel_corei7_64-lmp-linux/lmp-factory-image/1.0-r0/recipe-sysroot-native/usr/bin/systemctl", line 351, in <module> main() File "/build/lmp/build-lmp/tmp-lmp/work/intel_corei7_64-lmp-linux/lmp-factory-image/1.0-r0/recipe-sysroot-native/usr/bin/systemctl", line 337, in main SystemdUnit(root, service).enable() File "/build/lmp/build-lmp/tmp-lmp/work/intel_corei7_64-lmp-linux/lmp-factory-image/1.0-r0/recipe-sysroot-native/usr/bin/systemctl", line 222, in enable config = SystemdFile(self.root, path, instance_unit_name) File "/build/lmp/build-lmp/tmp-lmp/work/intel_corei7_64-lmp-linux/lmp-factory-image/1.0-r0/recipe-sysroot-native/usr/bin/systemctl", line 31, in __init__ self._parse(root, path) File "/build/lmp/build-lmp/tmp-lmp/work/intel_corei7_64-lmp-linux/lmp-factory-image/1.0-r0/recipe-sysroot-native/usr/bin/systemctl", line 80, in _parse k = m.group('key') AttributeError: 'NoneType' object has no attribute 'group' I hacked the systemctl python script to print out the path of the unit file and the currently examined line, and the exception occurs right at the first line containing "[Unit]".