Add functionality to the software-station to detect vital packages associated with installed packages, warn the user about the potential impact of deleting these packages, and ask the user to confirm whether they still wish to proceed with deletion.
Feature Details
Vital Package Detection:
Use the pkg query "%V" command to detect whether a package is marked as "vital" before deletion.
If a package is detected as vital, prompt the user with a warning indicating that removing the package may affect system stability or other installed packages.
Confirmation Before Deletion:
After warning the user, ask for explicit confirmation to proceed with the deletion of the vital package.
If the user chooses to proceed, the vital status should be unset before deletion using the command:
pkg set -v 0 <package-name>
Implementation Steps:
Detect if the package is marked as vital using pkg query "%V".
Add a warning prompt to inform the user of the potential risks associated with deleting a vital package.
Ask the user to confirm whether they want to proceed with deletion.
If the user confirms, run the command pkg set -v 0 to unset the vital status before deleting the package.
Proceed with the deletion only if the vital status is unset, and the user has confirmed the action.
Acceptance Criteria
The software-station can detect vital packages before deletion using pkg query "%V".
The user is warned when attempting to delete a vital package and asked to confirm the deletion.
If the user confirms, the vital status of the package is unset using pkg set -v 0 <package-name>.
The process does not allow the user to delete vital packages without being explicitly informed and consenting.
Description
Add functionality to the software-station to detect vital packages associated with installed packages, warn the user about the potential impact of deleting these packages, and ask the user to confirm whether they still wish to proceed with deletion.
Feature Details
Vital Package Detection:
pkg query "%V"
command to detect whether a package is marked as "vital" before deletion.Confirmation Before Deletion:
Implementation Steps:
pkg query "%V"
.pkg set -v 0
to unset the vital status before deleting the package.Acceptance Criteria
pkg query "%V"
.pkg set -v 0 <package-name>
.