media-tv/mythtv: die if mythtv's home is not a directory

Closes: https://bugs.gentoo.org/763132
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45213
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Z. Liu
2025-12-31 01:02:54 +08:00
committed by Sam James
parent 142845b4fc
commit 299f2240a0

View File

@@ -149,6 +149,17 @@ python_check_deps() {
python_has_version "dev-python/requests-cache[${PYTHON_USEDEP}]"
}
pkg_pretend() {
if use autostart; then
local HOME_MYTHTV=$(egethome mythtv)
if [[ ! -z "${HOME_MYTHTV}" && ! -d "${HOME_MYTHTV}" ]] ; then
eerror "Home path '${HOME_MYTHTV}' for user 'mythtv' exists" \
"but is not a directory"
die
fi
fi
}
pkg_setup() {
use python && python-any-r1_pkg_setup
}