From 541192d8a4e3e8f06cf1770a840e9555a9768d6c Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:08:21 -0500 Subject: [PATCH] api: `refresh_pkgapp_status` remove hidden mark regardless if app is installed or not --- api | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/api b/api index dbe2152f96..f5004aa267 100755 --- a/api +++ b/api @@ -1771,6 +1771,7 @@ refresh_pkgapp_status() { #for the specified package-app, if dpkg thinks it's in #this app is trying to install a package that's not on the repository. Hide the app. echo "Marking $app as hidden" "${DIRECTORY}/etc/categoryedit" "$app" 'hidden' >/dev/null + return #if that package is installed elif package_installed "$package" ;then #mark this app as installed @@ -1787,14 +1788,14 @@ refresh_pkgapp_status() { #for the specified package-app, if dpkg thinks it's in rm -f "${DIRECTORY}/data/status/${app}" shlink_link "$app" uninstall & fi - - #package is hidden but available. Show it. - if grep -qxF "${app}|hidden" "${DIRECTORY}/data/category-overrides" ;then - #move app to original category - #this should not cause a tug-of-war if a package-app is ever hidden with one of the OS-specific overrides files, because category detection is constrained to the category-overrides file. - echo "Unhiding $app as its packages are now available" - "${DIRECTORY}/etc/categoryedit" "$app" "$(grep "^${app}|" "${DIRECTORY}/etc/categories" | awk -F'|' '{print $2}')" >/dev/null - fi + fi + + #package is hidden but available. Show it. + if grep -qxF "${app}|hidden" "${DIRECTORY}/data/category-overrides" ;then + #move app to original category + #this should not cause a tug-of-war if a package-app is ever hidden with one of the OS-specific overrides files, because category detection is constrained to the category-overrides file. + echo "Unhiding $app as its packages are now available" + "${DIRECTORY}/etc/categoryedit" "$app" "$(grep "^${app}|" "${DIRECTORY}/etc/categories" | awk -F'|' '{print $2}')" >/dev/null fi }