Merge pull request #2803 from MilhouseVH/le90_debug_with_depends

debug: dependencies don't build with debug by default. use + suffix t…
This commit is contained in:
Christian Hewitt 2018-07-15 07:32:52 +04:00 committed by GitHub
commit a3df92074b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 10 deletions

View File

@ -504,8 +504,9 @@ set_debug_depends() {
[ -z "${map}" ] && map="${pkg}" [ -z "${map}" ] && map="${pkg}"
for mpkg in ${map//,/ }; do for mpkg in ${map//,/ }; do
[[ ${mpkg} =~ ^[!-] ]] && bpkg="${mpkg:1}" || bpkg="${mpkg}" [[ ${mpkg} =~ ^[!-] ]] && bpkg="${mpkg:1}" || bpkg="${mpkg}"
[[ ${bpkg} =~ \+$ ]] && bpkg="${bpkg::-1}"
# Remove existing instances of this package # Remove existing instances of this package
listcontains "${_DEBUG_PACKAGE_LIST}" "[!-]?${bpkg}" && _DEBUG_PACKAGE_LIST="$(listremoveitem "${_DEBUG_PACKAGE_LIST}" "[!-]?${bpkg}")" listcontains "${_DEBUG_PACKAGE_LIST}" "[!-]?${bpkg}[+]?" && _DEBUG_PACKAGE_LIST="$(listremoveitem "${_DEBUG_PACKAGE_LIST}" "[!-]?${bpkg}[+]?")"
# Add package # Add package
_DEBUG_PACKAGE_LIST+=" ${mpkg}" _DEBUG_PACKAGE_LIST+=" ${mpkg}"
done done
@ -514,11 +515,12 @@ set_debug_depends() {
tmp_array=(${_DEBUG_PACKAGE_LIST}) tmp_array=(${_DEBUG_PACKAGE_LIST})
_DEBUG_PACKAGE_LIST="${tmp_array[@]}" _DEBUG_PACKAGE_LIST="${tmp_array[@]}"
# Determine dependencies for each package # Determine dependencies for each package+
for pkg in ${_DEBUG_PACKAGE_LIST}; do for pkg in ${_DEBUG_PACKAGE_LIST}; do
if [ "${pkg}" != "all" ] && [[ ! ${pkg} =~ ^[!-] ]]; then if [ "${pkg}" != "all" ] && [[ ! ${pkg} =~ ^[!-] ]]; then
! listcontains "${_DEBUG_DEPENDS_LIST}" "${pkg}" && _DEBUG_DEPENDS_LIST+=" ${pkg}" ! listcontains "${_DEBUG_DEPENDS_LIST}" "${pkg}" && _DEBUG_DEPENDS_LIST+=" ${pkg}"
for dep_pkg in $(get_pkg_variable ${pkg} PKG_DEPENDS_TARGET); do [[ ! ${pkg} =~ \+$ ]] && continue
for dep_pkg in $(get_pkg_variable ${pkg::-1} PKG_DEPENDS_TARGET); do
[ "${dep_pkg}" = "toolchain" ] && continue [ "${dep_pkg}" = "toolchain" ] && continue
[[ ${dep_pkg} =~ ^.*:host$ ]] && continue [[ ${dep_pkg} =~ ^.*:host$ ]] && continue
! listcontains "${_DEBUG_DEPENDS_LIST}" "${dep_pkg}" && _DEBUG_DEPENDS_LIST+=" ${dep_pkg}" ! listcontains "${_DEBUG_DEPENDS_LIST}" "${dep_pkg}" && _DEBUG_DEPENDS_LIST+=" ${dep_pkg}"
@ -536,7 +538,7 @@ set_debug_depends() {
build_with_debug() { build_with_debug() {
if [ "${DEBUG:-no}" != "no" -a -n "${PKG_NAME}" -a -n "${_DEBUG_DEPENDS_LIST+x}" ]; then if [ "${DEBUG:-no}" != "no" -a -n "${PKG_NAME}" -a -n "${_DEBUG_DEPENDS_LIST+x}" ]; then
# Return 1 if this package is not to be built with debug # Return 1 if this package is not to be built with debug
listcontains "${_DEBUG_PACKAGE_LIST}" "[!-]${PKG_NAME}" && return 1 listcontains "${_DEBUG_PACKAGE_LIST}" "[!-]${PKG_NAME}[+]?" && return 1
# Build all packages with debug # Build all packages with debug
listcontains "${_DEBUG_PACKAGE_LIST}" "all" && return 0 listcontains "${_DEBUG_PACKAGE_LIST}" "all" && return 0
@ -544,11 +546,11 @@ build_with_debug() {
# Debugging is enabled for at least one package, so enable debug in the "debug" virtual package # Debugging is enabled for at least one package, so enable debug in the "debug" virtual package
[ "${PKG_NAME}" = "debug" ] && return 0 [ "${PKG_NAME}" = "debug" ] && return 0
# Build addons with debug if we're building the mediacenter with debug # Build addons with debug if we're building the mediacenter with debug and with dependencies
[ "${PKG_IS_ADDON}" = "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "${MEDIACENTER}" && return 0 [ "${PKG_IS_ADDON}" = "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "${MEDIACENTER}\+" && return 0
# Build kernel packages with debug if we're building the kernel with debug # Build kernel packages with debug if we're building the kernel with debug and with dependencies
[ "${PKG_IS_KERNEL_PKG}" = "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "linux" && return 0 [ "${PKG_IS_KERNEL_PKG}" = "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "linux\+" && return 0
# Build this package with debug if it's a resolved dependency # Build this package with debug if it's a resolved dependency
listcontains "${_DEBUG_DEPENDS_LIST}" "${PKG_NAME}" && return 0 listcontains "${_DEBUG_DEPENDS_LIST}" "${PKG_NAME}" && return 0

View File

@ -205,8 +205,9 @@
SYSTEM_PART_START=8192 SYSTEM_PART_START=8192
# Configure debug groups (space delimited key=value pairs, with each value comma-delimited) and default group when DEBUG=yes # Configure debug groups (space delimited key=value pairs, with each value comma-delimited) and default group when DEBUG=yes
DEBUG_GROUPS="kodi=kodi,kodi-platform,p8-platform,!mesa" # Use ! or - prefix to prevent a dependent package from being built with debug. Add + suffix to build dependenencies with debug.
DEBUG_GROUP_YES="kodi" DEBUG_GROUPS="kodi+=kodi+,kodi-platform+,p8-platform+,!mesa"
DEBUG_GROUP_YES="kodi+"
# Default supported get handlers (archive, git, file etc.) # Default supported get handlers (archive, git, file etc.)
GET_HANDLER_SUPPORT="archive" GET_HANDLER_SUPPORT="archive"