diff --git a/scripts/brp-debuginfo.in b/scripts/brp-debuginfo.in index 5d5c6c1..f3c6358 100755 --- a/scripts/brp-debuginfo.in +++ b/scripts/brp-debuginfo.in @@ -77,3 +77,13 @@ while read -r l; do mkdir -p .debuginfo/links/"${debugf%/*}" printf '%s\n' "${debugl#.}" >>.debuginfo/links/"$debugf" done <.tmp/flist + +if [ -s .tmp/no_debug_info ]; then + howmuch=$(wc -l < .tmp/no_debug_info) + Warning "$howmuch non-stripped binaries don't contain .debug sections making -debuginfo" + Warning "package less relevant. An excerpt from the list of affected files follows:" + sed 's/^/ /; 10q' < .tmp/no_debug_info >&2 + if egrep -q '/lib/modules/.*(/vmlinux|\.ko)$' .tmp/no_debug_info; then + Warning "Please enable CONFIG_DEBUG_INFO=y in the kernel package!" + fi +fi diff --git a/scripts/process-debuginfo.in b/scripts/process-debuginfo.in index dc81259..3bdccde 100755 --- a/scripts/process-debuginfo.in +++ b/scripts/process-debuginfo.in @@ -84,6 +84,7 @@ while read -r src; do fi printf '%s\n' /usr/src/debug/"$src" done >.debuginfo/src/"$f" +[ -s .tmp/src.$$ ] || printf '%s\n' "$f" >> .tmp/no_debug_info rm .tmp/src.$$ if [ -n "$rezip" ]; then