Let's beef up the crypto mount check and check if there are only
empty directories in the mount and ignore it if that's the case.
This handles the case where e.g. on Arch installing pesign leads
to /etc/pki containing only /etc/pki/pesign as an empty directory.
Path("etc/ca-certificates"),
Path("var/lib/ca-certificates"),
)
- if (root / subdir).exists()
+ if (root / subdir).exists() and any(p for p in (root / subdir).rglob("*") if not p.is_dir())
]
# This contains the Arch Linux keyring, which isn't certificates so ToolsTreeCertificates= doesn't apply.