Skip to content

Commit

Permalink
api: remove_repofile_if_unused correct testmode output
Browse files Browse the repository at this point in the history
`anything_installed_from_uri_suite_component` does not return any output of what package is in use
  • Loading branch information
theofficialgman committed Feb 25, 2024
1 parent ced0073 commit 61ebff5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions api
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,7 @@ remove_repofile_if_unused() { #Given a sources.list.d file, delete it if nothing
if [ "$testmode" == test ] && [ "$in_use" == 0 ];then
echo "The given repository is not in use and can be deleted:"$'\n'"$file" 1>&2
elif [ "$testmode" == test ];then
#explain what package is installed from this repo
echo "At least this package is preventing the repo from being removed (there may be more)"
anything_installed_from_uri_suite_component "$uri" "$suite" "$component" #uses last values of url, suite, and component
echo "At least one package is preventing the repo from being removed"
elif [ "$in_use" == 0 ];then
status "Removing the $(basename "$file" | sed 's/.list$//g' | sed 's/.sources$//g') repo as it is not being used"
sudo rm -f "$file"
Expand Down

0 comments on commit 61ebff5

Please sign in to comment.