aboutsummaryrefslogtreecommitdiff
blob: 2e21d6d04f12c2eac28453c7fff9bef774f8b4c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Check for directories that need to be created at runtime

runtime_dir_check() {
	# It's ok create these directories, but not to install into them. #493154
	# TODO: We should add var/lib to this list.
	local x f=
	for x in var/cache var/lock var/run run ; do
		if [[ ! -L ${ED}/${x} && -d ${ED}/${x} ]] ; then
			if [[ -z $(find "${ED}/${x}" -prune -empty) ]] ; then
				f+=$(cd "${ED}"; find "${x}" -printf '  %p\n')
			fi
		fi
	done
	if [[ -n ${f} ]] ; then
		eqawarn "QA Notice: This ebuild installs into paths that should be created at runtime."
		eqawarn " To fix, simply do not install into these directories.  Instead, your package"
		eqawarn " should create dirs on the fly at runtime as needed via init scripts/etc..."
		eqawarn
		eqawarn "${f}"
	fi
}

runtime_dir_check
: # guarantee successful exit

# vim:ft=sh