-
Notifications
You must be signed in to change notification settings - Fork 7
feat(pkg/boards): add IsUserPartitionPreservationSupported function #158
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
base: main
Are you sure you want to change the base?
Conversation
pkg/board/os_image.go
Outdated
| // according to the current and target OS image versions. | ||
| // | ||
| // Preservation is supported if both versions are not the R0 image. | ||
| func IsUserPartitionPreservationSupported(conn remote.RemoteConn, targetImageVersion OSImageRelease) bool { |
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 would make this a pure function; take current and target and returns if it is possible ot not to preserve user partition.
| func IsUserPartitionPreservationSupported(conn remote.RemoteConn, targetImageVersion OSImageRelease) bool { | |
| func IsUserPartitionPreservationSupported(current, target string) bool { |
|
We don't have the approval requirement to squash and merge this PR?! |
@mirkoCrobu I would wait for this #157 first. |
IsUserPartitionPreservationSupported function
IsUserPartitionPreservationSupported function|
@lucarin91 I meant that I was seeing the merge button enabled even though there was no approval. Now it is disabled! |
Motivation
closes #44
Simple check: knowing the version of the image to be flashed on the board and the version of the image currently on the board, return if it is possible to preserve the user partition during the flash operation.
If one of the current version or target version is R0, return False.
Change description
Additional Notes
Reviewer checklist
main.