Commit b3d4fd5
systemd: keep the unit type when expanding preset template instances
_parse_preset_entry() hardcoded '.service' when expanding a preset entry that
names template instances, so "enable backup@.timer daily" yielded
backup@daily.service. Harmless while only service presets were consumed; now
that presets are read per unit type, such an entry is attributed to the wrong
type and dropped by the type filter.
Derive the suffix from the matched template unit file instead. No EL8->EL9
preset currently declares template instances for a non-service unit, so this is
a latent fix rather than a behavior change on any supported upgrade path.
Found in review of PR #69.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 451d923 commit b3d4fd5
3 files changed
Lines changed: 14 additions & 4 deletions
File tree
- repos/system_upgrade/common/libraries
- tests
- test_systemd_files
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
203 | 206 | | |
204 | | - | |
205 | | - | |
206 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| 146 | + | |
141 | 147 | | |
142 | 148 | | |
143 | 149 | | |
| |||
175 | 181 | | |
176 | 182 | | |
177 | 183 | | |
| 184 | + | |
178 | 185 | | |
179 | 186 | | |
180 | 187 | | |
| |||
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
270 | | - | |
| 277 | + | |
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
| |||
Whitespace-only changes.
0 commit comments