fix(cros-workon.eclass): Fix support for EAPI=5 subslots

The subslot should not be used as part of package name directories.
This fixes the kernel builds now that cros-kernel2 uses subslots.
This commit is contained in:
Michael Marineau 2014-01-03 10:11:50 -08:00
parent 340ce65bc8
commit d3bfcc7823

View File

@ -455,9 +455,11 @@ cros-workon_src_unpack() {
cros-workon_get_build_dir() {
local dir
# strip subslot, for EAPI=5
local slot="${SLOT%/*}"
if [[ ${CROS_WORKON_INCREMENTAL_BUILD} == "1" ]]; then
dir="${SYSROOT}/var/cache/portage/${CATEGORY}/${PN}"
[[ ${SLOT:-0} != "0" ]] && dir+=":${SLOT}"
[[ ${slot:-0} != "0" ]] && dir+=":${slot}"
else
dir="${WORKDIR}/build"
fi
@ -570,7 +572,9 @@ cros-workon_src_install() {
fi
if [[ -d "${LCOV_DIR}" ]] ; then
local dir="${PN}"
[[ ${SLOT} != "0" ]] && dir+=":${SLOT}"
# strip subslot, for EAPI=5
local slot="${SLOT%/*}"
[[ ${slot} != "0" ]] && dir+=":${slot}"
insinto "/usr/share/profiling/${dir}/lcov"
doins -r "${LCOV_DIR}"/*
fi