Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the installed package instead of from ubuntu-archive (BugFix) #640

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion providers/base/bin/check-ubuntu-desktop-recommends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ set -euo pipefail
IFS=$'\n\t'

noninstalled=()
target_version="$(dpkg-query --showformat='${Version}' --show ubuntu-desktop)"
apt_show_ud="$(apt-cache show ubuntu-desktop="$target_version")"
recommends="$(echo "${apt_show_ud}"| grep ^Recommends | head -n 1)"
while read -r pkg; do
# libreoffice-impress provides libreoffice-ogltrans, and libreoffice-ogltrans becomes a transitional package on Ubuntu 20.04.
# shellcheck disable=SC2016
if ! dpkg-query -W -f='${Status}\n' "$pkg" 2>&1 | grep "install ok installed" >/dev/null 2>&1 && [ "$pkg" != "libreoffice-ogltrans" ]; then
noninstalled+=("$pkg")
fi
done < <(apt-cache show ubuntu-desktop | grep ^Recommends | head -n 1 | cut -d : -f 2- | xargs | sed 's/ //g' | tr , $'\n')
done < <(echo "$recommends"| cut -d : -f 2-| xargs| sed 's/ //g'| tr , $'\n')

if [ -n "${noninstalled[*]}" ]; then
IFS=' '
Expand Down
Loading