-
Notifications
You must be signed in to change notification settings - Fork 51
Services-manager conversion to scripts #2319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a6cf0cf
to
941f7fc
Compare
941f7fc
to
ada02f0
Compare
f76ee03
to
01f56c1
Compare
ff16345
to
ab14d92
Compare
ab14d92
to
5f99187
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to adjust the approach a bit. Please, check the comments. Thanks!
def ondemand_to_cmd | ||
ondemand_services.map do |service| | ||
"systemctl enable #{service}.socket" | ||
end.join("\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bear in mind that JSON does not allow multi-line strings. You might need to escape the "" (not tested).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that json doesn't work with:
body: "first line
second line"
but
body: "first line\nsecondline"
should be fine
but you're right i need to double check whether i really produce the second case
4981419
to
de011ec
Compare
654c09e
to
4e0e6b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, update https://github.com/agama-project/agama/blob/master/service/share/autoyast-compat.json#L288-L289.
Generating four different scripts looks too much to me. Why not combine all of them into a single script? You would not need to worry about indexes and that stuff.
@@ -85,6 +86,8 @@ def read_post_scripts | |||
scripts = scripts_section.fetch("chroot-scripts", []).map do |script| | |||
read_post_script(script) | |||
end | |||
scripts += ServicesManagerReader.new(profile).read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to change the array in place, you might want to use concat
. But I do not have a strong opinion.
The main idea was that in theory we might decide to generate a slightly different scripts for various services types in the future. So, just "logical" separation. |
I think it adds some complexity to the implementation and, more important, to the resulting profile with no benefits. We can split the script in the future if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
e4f2efd
to
9c548ec
Compare
877106e
to
51c49ae
Compare
aa4192e
to
31adafb
Compare
Prepare to release Agama 15: * #2258 * #2270 * #2277 * #2279 * #2283 * #2284 * #2285 * #2286 * #2287 * #2288 * #2291 * #2292 * #2293 * #2295 * #2297 * #2299 * #2300 * #2301 * #2302 * #2303 * #2305 * #2306 * #2307 * #2308 * #2309 * #2313 * #2314 * #2315 * #2317 * #2318 * #2319 * #2320 * #2321 * #2322 * #2323 * #2324 * #2325 * #2328 * #2329 * #2330 * #2331 * #2335 * #2336 * #2337 * #2338 * #2339 * #2340 * #2342 * #2345 * #2346 * #2348 * #2349 * #2350 * #2351 * #2352 * #2353 * #2354 * #2355 * #2357 * #2358 * #2359 * #2360 * #2361 * #2362 * #2363 * #2364 * #2365 * #2366 * #2368 * #2369 * #2370 * #2371 * #2372 * #2374 * #2377 * #2378 * #2379 * #2380 * #2381 * #2382 * #2384 * #2385 * #2386 * #2388 * #2389 * #2390 * #2391 * #2392 * #2394 * #2397 * #2398 * #2401 * #2403
Problem
Missing support for `AY profile
<services-manager>
section .Solution
Another piece to AutoYaST profile conversion. Takes
<services-manager>
section and turns it into agama's post install script(s)Testing
Remember to look at it from the user's perspective. Yes you have made the compiler happy.
But will the humans even know about your contribution? Sometimes they cannot miss it,
other times they need advertisement and explanation.
Look for relevant sections and adjust:
git ls-files '*.md'