public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] linux-module: Obtain package names without version
@ 2021-04-02 12:05 Anton Mikanovich
  2021-04-06  7:10 ` Henning Schild
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Mikanovich @ 2021-04-02 12:05 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

Add filtering out of package version for KERNEL_DEP variable.
This allow to obtain package names even in case of version syntax:
Depends: linux-headers-5.7.0-3-armmp (= 5.7.17-1)

This will fix following error when building example-module-armmp for
debian-bullseye:

dpkg-query: error: --listfiles needs a valid package name but
'(=' is not: illegal package name in specifier '(=': must start with an
alphanumeric character

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/recipes-kernel/linux-module/module.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index 47b9b71..419786b 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -41,7 +41,8 @@ dpkg_runbuild_prepend() {
         # Debian kernels install that folder indirectly via a dependency.
         KERNEL_DEP=$(dpkg -s --root=${BUILDCHROOT_DIR} linux-headers-${KERNEL_NAME} | \
                      grep "^Depends: .*linux-headers-" | \
-                     sed 's/.*\(linux-headers-[^,]*\).*/\1/')
+                     sed 's/.*\(linux-headers-[^,]*\).*/\1/' | \
+                     sed 's/([^)]*)//g')
         export KDIR=$(dpkg -L --root=${BUILDCHROOT_DIR} ${KERNEL_DEP} | \
                       grep "/lib/modules/.*/build")
     fi
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-08  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 12:05 [PATCH] linux-module: Obtain package names without version Anton Mikanovich
2021-04-06  7:10 ` Henning Schild
2021-04-08  9:48   ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox