items/zfs_dataset: add automatic dependency for all files, directories and git_deploy of a dataset

This commit is contained in:
Franzi 2021-07-17 09:10:56 +02:00
parent b3e322ae08
commit 1086ed28c3
Signed by: kunsi
GPG key ID: 12E3D2136B818350
6 changed files with 9 additions and 28 deletions

View file

@ -119,6 +119,14 @@ class ZFSDataset(Item):
# XXX Could be optimized by finding the "largest"
# parent only.
yield item.id
elif self.attributes.get('mountpoint'):
for item_type in ['directory', 'file', 'git_deploy']:
if (
item.ITEM_TYPE_NAME == item_type and
item.name.startswith('{}:{}'.format(item_type, self.attributes['mountpoint']))
):
yield item.id
if not pool_item_found:
raise BundleError(_(