diff options
| -rw-r--r-- | meta/classes-recipe/systemd.bbclass | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes-recipe/systemd.bbclass b/meta/classes-recipe/systemd.bbclass index be77da4812..4b4470b7b3 100644 --- a/meta/classes-recipe/systemd.bbclass +++ b/meta/classes-recipe/systemd.bbclass | |||
| @@ -132,18 +132,18 @@ python systemd_populate_packages() { | |||
| 132 | # for *.service add *@.service | 132 | # for *.service add *@.service |
| 133 | service_base = service.replace('.service', '') | 133 | service_base = service.replace('.service', '') |
| 134 | systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') | 134 | systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') |
| 135 | # Add the socket unit which is referred by the Also= in this service file to the same package. | ||
| 136 | with open(fullpath, 'r') as unit_f: | ||
| 137 | for line in unit_f: | ||
| 138 | if line.startswith('Also'): | ||
| 139 | also_unit = line.split('=', 1)[1].strip() | ||
| 140 | if also_unit.find('.socket') != -1: | ||
| 141 | systemd_add_files_and_parse(pkg_systemd, path, also_unit) | ||
| 135 | if service.find('.socket') != -1: | 142 | if service.find('.socket') != -1: |
| 136 | # for *.socket add *.service and *@.service | 143 | # for *.socket add *.service and *@.service |
| 137 | service_base = service.replace('.socket', '') | 144 | service_base = service.replace('.socket', '') |
| 138 | systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service') | 145 | systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service') |
| 139 | systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') | 146 | systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') |
| 140 | # Add all units which have an Also= referring a unit in this package to this package as well. | ||
| 141 | with open(fullpath, 'r') as unit_f: | ||
| 142 | for line in unit_f: | ||
| 143 | if line.startswith('Also'): | ||
| 144 | also_unit = line.split('=', 1)[1].strip() | ||
| 145 | bb.warn("also: %s" % also_unit) | ||
| 146 | systemd_add_files_and_parse(pkg_systemd, path, also_unit) | ||
| 147 | 147 | ||
| 148 | # Check service-files and call systemd_add_files_and_parse for each entry | 148 | # Check service-files and call systemd_add_files_and_parse for each entry |
| 149 | def systemd_check_services(): | 149 | def systemd_check_services(): |
