diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2024-01-24 19:41:58 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2024-01-24 19:48:12 +0000 |
commit | 30df19dc897c51a19c2d39e9863fc13ee7762494 (patch) | |
tree | ce524498f557150cad1127dd44bcb1388e57d354 | |
parent | 00687513b0181bcef1259fa159c58ea2f09e7343 (diff) |
setup-desktop: fix install of gnome
Ensure that community repos are enabled when we do apk info to find out
which gnome packages we need.
fixes: https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10564
fixes: https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10574
-rw-r--r-- | setup-desktop.in | 5 | ||||
-rwxr-xr-x | tests/bin/apk | 6 | ||||
-rwxr-xr-x | tests/setup_desktop_test | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/setup-desktop.in b/setup-desktop.in index 3d7fafe..34568d2 100644 --- a/setup-desktop.in +++ b/setup-desktop.in @@ -80,8 +80,9 @@ case "$de" in rc-update add lightdm ;; gnome) - setup-xorg-base ${BROWSER:-firefox} $(apk info --quiet --depends \ - gnome gnome-apps-core) "$@" + setup-xorg-base ${BROWSER:-firefox} "$@" + # apk info needs community repos which are enabled with setup-xorg-base + apk add $(apk info --quiet --depends gnome gnome-apps-core) rc-update add gdm rc-update add elogind ;; diff --git a/tests/bin/apk b/tests/bin/apk index aaed957..7b1296f 100755 --- a/tests/bin/apk +++ b/tests/bin/apk @@ -58,7 +58,11 @@ case "$cmd" in printf "%s depends on:\n\n" fi case "$pkg" in - *gnome*) printf "gnome-shell\ngvfs\n";; + *gnome*) + if grep -q '^[^#].*community$' etc/apk/repositories; then + printf "gnome-shell\ngvfs\n" + fi + ;; esac done ;; diff --git a/tests/setup_desktop_test b/tests/setup_desktop_test index 026a83f..4ece476 100755 --- a/tests/setup_desktop_test +++ b/tests/setup_desktop_test @@ -32,6 +32,8 @@ setup_desktop_xfce_body() { setup_desktop_gnome_body() { init_env + mkdir -p etc/apk + echo "https://example.tld/main" > etc/apk/repositories atf_check -s exit:0 \ -o match:"apk add.*gnome" \ -o match:"Starting udev" \ |