pkg-install & purge-installed fixes for package-double-checking

pull/569/head
Botspot 3 years ago
parent 77f7d5b733
commit fd00e25b76

@ -117,7 +117,7 @@ if [ ! -z "$INSTALL_LIST" ];then
INSTALL_LIST="$(sudo LANG=C LC_ALL=C apt-get install --no-install-recommends --dry-run $PKG_LIST | sed -n '/The following packages/,/to remove/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ' | sed 's/The following.*//')"
if [ ! -z $INSTALL_LIST ];then
if [ ! -z "$INSTALL_LIST" ];then
echo -e "\e[91mAPT did not exit with an error, but these packages failed to install somehow: $INSTALL_LIST\e[39m"
exit 1
else

@ -55,7 +55,7 @@ if [ $exitcode != 0 ] || [ ! -z "$errors" ];then
fi
#ensure all packages are really purged
PURGE_LIST="$(sudo LANG=C apt-get purge --dry-run $PKG_LIST | sed -n '/The following packages/,/to remove/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ')"
PURGE_LIST="$(sudo LANG=C apt-get purge --dry-run $PKG_LIST | sed -n '/The following packages will be REMOVED/,/to remove and/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ' | sed 's/The following.*//')"
if [ ! -z "$PURGE_LIST" ];then
error "APT did not exit with an error, but these packages are still installed somehow: $PURGE_LIST"

Loading…
Cancel
Save