diff mbox series

[Unstable,2/6] UBUNTU: [Debian]: Handle debug symbols for modules in extras too

Message ID 20190828122604.6829-3-mfo@canonical.com
State New
Headers show
Series Add support for ZFS debug symbols | expand

Commit Message

Mauricio Faria de Oliveira Aug. 28, 2019, 12:26 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1840704

The debug symbols section only searches for modules in the
'$(pkgdir)' path (in linux-modules package) but not in the
'$(pkdir_ex)' path (in linux-modules-extra).

Thus, modules in the extras package have no '.gnu_debuglink'.

Fix it by searching in $(pkgdir_ex) too if extras is enabled.

Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
---
 debian/rules.d/2-binary-arch.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 730373e93e53..ff6e35b697e2 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -282,7 +282,9 @@  ifneq ($(skipdbg),true)
 		INSTALL_MOD_PATH=$(dbgpkgdir)/usr/lib/debug
 	# Add .gnu_debuglink sections to each stripped .ko
 	# pointing to unstripped verson
-	find $(pkgdir) -name '*.ko' | while read path_module ; do \
+	find $(pkgdir) \
+	  $(if $(filter true,$(do_extras_package)),$(pkgdir_ex)) \
+	  -name '*.ko' | while read path_module ; do \
 		module="/lib/modules/$${path_module#*/lib/modules/}"; \
 		if [[ -f "$(dbgpkgdir)/usr/lib/debug/$$module" ]] ; then \
 			$(CROSS_COMPILE)objcopy \