diff options
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -927,10 +927,16 @@ pkg_remove() { required_by="$required_by'${file##*/}', " done + [ "$required_by" ] && + die "$1" "Package is required by ${required_by%, }" + # Disable globbing. set -f - [ "$required_by" ] && die "$1" "Package is required by ${required_by%, }" + # Ensure that the user leaves their machine in a working state by + # refusing to remove the package which providees 'su'. + grep -q "^$(command -v su)$" "$sys_db/$1/manifest" && + die "$1" "Removing su will break the system." # Block being able to abort the script with 'Ctrl+C' during removal. # Removes all risk of the user aborting a package removal leaving |