Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a --readonly flag to the usroverlay command, allowing the creation of a read-only transient overlay on /usr. The changes are well-implemented across the CLI, the two backends (ostree and composefs), documentation, and tests. The code is clear and the new functionality is tested. I have one minor suggestion to improve code conciseness.
| let args = match access_mode { | ||
| // In this context, "--transient" means "read-only overlay" | ||
| FilesystemOverlayAccessMode::ReadOnly => ["admin", "unlock", "--transient"].as_slice(), | ||
|
|
||
| FilesystemOverlayAccessMode::ReadWrite => ["admin", "unlock"].as_slice(), | ||
| }; |
There was a problem hiding this comment.
This match statement can be simplified into an if/else expression to make it more concise.
| let args = match access_mode { | |
| // In this context, "--transient" means "read-only overlay" | |
| FilesystemOverlayAccessMode::ReadOnly => ["admin", "unlock", "--transient"].as_slice(), | |
| FilesystemOverlayAccessMode::ReadWrite => ["admin", "unlock"].as_slice(), | |
| }; | |
| let args: &[&str] = if access_mode == FilesystemOverlayAccessMode::ReadOnly { | |
| // In this context, "--transient" means "read-only overlay" | |
| &["admin", "unlock", "--transient"] | |
| } else { | |
| &["admin", "unlock"] | |
| }; |
Signed-off-by: Evan Goode <mail@evangoo.de>
Signed-off-by: Evan Goode <mail@evangoo.de>
311143c to
331b8b9
Compare
|
|
||
| # SYNOPSIS | ||
|
|
||
| **bootc usr-overlay** \[*OPTIONS...*\] |
There was a problem hiding this comment.
just update-generated should resync the new options
There was a problem hiding this comment.
Done in a separate commit
Signed-off-by: Evan Goode <mail@evangoo.de>
Signed-off-by: Evan Goode <mail@evangoo.de>
Signed-off-by: Evan Goode <mail@evangoo.de>
331b8b9 to
0b759cb
Compare
| test: | ||
| - /tmt/tests/tests/test-34-user-agent | ||
|
|
||
| /plan-35-upgrade-preflight-disk-check: |
There was a problem hiding this comment.
not a huge deal but I think these tmt/* changes belong in the previous commit that adds the test code
| discover: | ||
| how: fmf | ||
| test: | ||
| - /tmt/tests/tests/test-35-upgrade-preflight-disk-check |
There was a problem hiding this comment.
I think this might have been a bad rebase? I believe this should point to the new test-usroverlay.nu file from the previous commit
Resolves #2034.