Summary: | sys-apps/openrc - stacked runlevels only work one level deep (and other fixes) | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Max Hacking <max.gentoo.bugzilla> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 481182 | ||
Attachments: |
Patch to fix run-level stacking (chaining) issues.
Patch to fix run-level stacking (chaining) issues. Patch to fix run-level stacking (chaining) issues. Patch (against current Git master) to fix run-level stacking (chaining) issues. |
Description
Max Hacking
2013-04-26 17:37:40 UTC
Created attachment 346840 [details, diff]
Patch to fix run-level stacking (chaining) issues.
It seems the problem space for this bug was more interesting than I originally thought. :-)
I've attached a more comprehensive patch which should resolve some additional issues.
Created attachment 346842 [details, diff]
Patch to fix run-level stacking (chaining) issues.
Sorry, added the wrong patch there. Fixed now.
Max, your patch does not apply cleanly to git master. Can you please update your patch so that I can apply it cleanly? Thanks, William Created attachment 346876 [details, diff]
Patch (against current Git master) to fix run-level stacking (chaining) issues.
Rebased patch attached as requested.
What is the reason for adding rc_get_runlevel_chain() instead of using rc_runlevel_stacks()? Thanks, William (In reply to comment #5) > What is the reason for adding rc_get_runlevel_chain() instead of > using rc_runlevel_stacks()? > > Thanks, > > William rc_runlevel_stacks() returns the stacks a single level deep while rc_get_runlevel_chain() returns the complete chain moving more recently used links to retain dpendency order when multiple runlevels are used. Eg: Given the runlevel chain below (A uses B & C, B & C use D) A -> B -> D -> C -> rc_runlevel_stacks() called on A will return B, C. rc_get_runlevel_chain() called on A will return A, B, C, D. Let me phrase my question another way. Why add rc_get_runlevel_chain instead of fixing rc_runlevel_stacks? Thanks, William (In reply to comment #7) > Let me phrase my question another way. Why add rc_get_runlevel_chain instead > of fixing rc_runlevel_stacks? > > Thanks, > > William Because rc_runlevel_stacks() may be used in other places where its current behaviour is expected. Also, I don't intend to search for every call to rc_runlevel_stacks() and refactor it to pass the list instead of expecting it to be returned. :-) Sorry but what is the state of this bug? is code applied/reviewed/rejected? Can I somehow help to speedup process? Patch works fine for me, (except I've removed some code style fixes), if you want them please send separate patch. I'd like someone with a real usecase test (bug 426948). Also I want to check if it's possible to fix rc_runlevel_stacks instead of introducing new function, as it's hidden function and we are free to change it. The fix for this is in commit 7716bf3 and will be included in OpenRC-0.13. |