Skip to content

Commit c0790a9

Browse files
committed
helpers: map 'xorg' for Pi5 and for 'legacy' exclusion
The 'xorg' (meta)-package will install the necessary packages to run an Xorg server and to launch applications under an Xorg environment. We need to map 'xorg' for: - Pi5 needs an additional package that provides configuration for Xorg, without it the server will not start. Unfortunately the package has no reverse dependency (for now), so it must be installed explicitely. - One of the recommended packages installed is the 'xserver-xorg-legacy' package, which breaks our x11 apps launched from `runcommand`. We already uninstall it when the setup script starts (regardless of how it was installed), but let's not install it ourselves when 'xorg' is a dependency for one of our own scriptmodules. NOTE: `runcommand` breakage under `-legacy` is due to our redirection of STDIN/STDOUT. The `-legacy` provided wrapper checks whether the current controlling tty is a 'real console' tty by looking at the major/minor device numbers and bails out if it's not 4/1.
1 parent e2d4e61 commit c0790a9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scriptmodules/helpers.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,13 @@ function _mapPackage() {
299299
libfreetype6-dev)
300300
[[ "$__os_debian_ver" -gt 10 ]] || compareVersions "$__os_ubuntu_ver" gt 23.04 && pkg="libfreetype-dev"
301301
;;
302+
xorg)
303+
# outside X11, don't install the 'xserver-xorg-legacy' package, even if recommended by 'apt'
304+
# since it breaks launching x11 apps with 'runcommand'
305+
! isPlatform "x11" && pkg+=" xserver-xorg-legacy-"
306+
# Pi5 needs an additional package for xserver to start
307+
isPlatform "rpi5" && pkg+=" gldriver-test"
308+
;;
302309
esac
303310
echo "$pkg"
304311
}

0 commit comments

Comments
 (0)