bundles/zfs: respect pacman/linux-lts option

This commit is contained in:
Franzi 2022-04-30 12:30:32 +02:00
parent 12e21d893f
commit 8cc116c0c4
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -50,12 +50,6 @@ defaults = {
},
'pacman': {
'packages': {
'zfs-linux-lts': {
'needed_by': {
'zfs_dataset:',
'zfs_pool:',
},
},
'zfs-utils': {
'needed_by': {
'svc_systemd:zfs-zed',
@ -129,6 +123,28 @@ if node.has_bundle('telegraf'):
}
@metadata_reactor.provides(
'pacman/packages',
)
def packages(metadata):
if node.metadata.get('pacman/linux-lts', False):
pkgname = 'zfs-linux-lts'
else:
pkgname = 'zfs-linux'
return {
'pacman': {
'packages': {
pkgname: {
'needed_by': {
'zfs_dataset:',
'zfs_pool:',
},
},
},
},
}
@metadata_reactor.provides(
'systemd-timers/timers/zfs-scrub',
)