Skip to content

Allow to delete mandatory filesystems#2129

Closed
ancorgs wants to merge 6 commits intoagama-project:after-release-beta2from
ancorgs:delete_root_beta2
Closed

Allow to delete mandatory filesystems#2129
ancorgs wants to merge 6 commits intoagama-project:after-release-beta2from
ancorgs:delete_root_beta2

Conversation

@ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Mar 7, 2025

Problem

Agama does not allow to delete the "/" partition nor the drive containing it.

But that was only implemented to hide some limitations of the current UI. In fact, deleting "/" or any other mandatory partition should be allowed. Of course, a proposal without mandatory mount paths is not valid and cannot be computed. But that doesn’t mean the user cannot delete them temporarily in order to create it elsewhere.

Solution

  • Detect and properly report when mandatory partitions are missing.
  • Adapt the UI to not panic (ie. resort to an empty state) when there are configuration errors that can actually be fixed by using the UI.
  • Allow to delete all partitions (including "/").
  • Adapt the "do not use" button of the drives to the new situation

Screenshots

Now the trash-can icon is there for root as well...

avion1

But nothing dramatic happens if the user clicks on it.

avion2

Testing

  • Tested manually
  • Unit tests adapted

@ancorgs ancorgs force-pushed the delete_root_beta2 branch 2 times, most recently from 0212cb3 to 1bc2d5c Compare March 11, 2025 01:06
@coveralls
Copy link

coveralls commented Mar 11, 2025

Pull Request Test Coverage Report for Build 13855195705

Details

  • 41 of 41 (100.0%) changed or added relevant lines in 10 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on delete_root_beta2 at 72.392%

Totals Coverage Status
Change from base Build 13837957018: 72.4%
Covered Lines: 20088
Relevant Lines: 27749

💛 - Coveralls

@ancorgs ancorgs force-pushed the delete_root_beta2 branch 2 times, most recently from a1d3a02 to 9da2d82 Compare March 13, 2025 16:41
@ancorgs ancorgs force-pushed the delete_root_beta2 branch 2 times, most recently from 6748aec to b8a0dac Compare March 14, 2025 10:52
@ancorgs ancorgs changed the title WIP: allow to delete mandatory filesystems Allow to delete mandatory filesystems Mar 14, 2025
@ancorgs ancorgs marked this pull request as ready for review March 14, 2025 10:53
@ancorgs ancorgs force-pushed the delete_root_beta2 branch from b8a0dac to c1c86c4 Compare March 14, 2025 11:01
@imobachgs imobachgs deleted the branch agama-project:after-release-beta2 March 14, 2025 15:25
@imobachgs imobachgs closed this Mar 14, 2025
dgdavid added a commit that referenced this pull request Mar 20, 2025
This is a re-incarnation of #2129, that was automatically closed by
Github.

## Problem

Agama does not allow to delete the "/" partition nor the drive
containing it.

But that was only implemented to hide some limitations of the current
UI. In fact, deleting "/" or any other mandatory partition should be
allowed. Of course, a proposal without mandatory mount paths is not
valid and cannot be computed. But that doesn’t mean the user cannot
delete them temporarily in order to create it elsewhere.

## Solution

- Detect and properly report when mandatory partitions are missing.
- Adapt the UI to not panic (ie. resort to an empty state) when there
are configuration errors that can actually be fixed by using the UI.
- Allow to delete all partitions (including "/").
- Adapt the "do not use" button of the drives to the new situation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments