main/postmarketos-base: install mesa-dri-gallium only if needed (MR 3478)
At the moment almost all device packages force installation of the Mesa drivers, even when they are not used by any application (for example on a minimal headless installation with "none" or "console" UI). Omitting mesa-dri-gallium from such installations saves about ~150 MiB of disk space (469 MiB -> 317 MiB rootfs for minimal installation on arrow-db410c). The "classic" drivers have been removed from Mesa so only one mesa-dri- package exists now: mesa-dri-gallium contains all Mesa drivers, llvmpipe, freedreno, lima, panfrost, Intel (iris/crocus), ... This means we can easily create an install_if package in postmarketos-base that installs that driver package only if needed (= only if another package requires the "mesa" package). Strictly speaking the install_if could be restricted further since mesa-dri-gallium is only needed by "mesa-egl", "mesa-gbm" and "mesa-gl" but not e.g. the Vulkan drivers. Having three postmarketos-base subpackages (one install_if for each of them) seems a bit overengineered, though. "mesa" is a common dependency of all three of them, so using install_if="... mesa" should be good enough.
This commit is contained in:
parent
e27f63fd40
commit
5f140538bf
1 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
pkgname=postmarketos-base
|
||||
pkgver=22
|
||||
pkgver=23
|
||||
pkgrel=0
|
||||
pkgdesc="Meta package for minimal postmarketOS base"
|
||||
url="https://postmarketos.org"
|
||||
|
@ -17,6 +17,7 @@ depends="
|
|||
install="$pkgname.post-install $pkgname.pre-upgrade $pkgname.post-upgrade"
|
||||
triggers="$pkgname.trigger=/etc"
|
||||
subpackages="
|
||||
$pkgname-mesa
|
||||
$pkgname-nftables
|
||||
$pkgname-nofde
|
||||
"
|
||||
|
@ -92,6 +93,13 @@ package() {
|
|||
postmarketos-mvcfg-package "$pkgdir" "$pkgname"
|
||||
}
|
||||
|
||||
mesa() {
|
||||
replaces=""
|
||||
depends="mesa-dri-gallium"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel mesa"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
nftables() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel nftables"
|
||||
depends="postmarketos-config-nftables"
|
||||
|
|
Loading…
Reference in a new issue