Skip to contentSkip to conversation

libblockdev: fix QA error in case of multilib

PATCH New Chen Qi 1 participant 1 message Oct 9, 2023

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 libblockdev: fix QA error in case of multilib

Fix the following QA error.

ERROR: QA Issue: libblockdev: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/python3.11
/usr/lib/python3.11/site-packages
/usr/lib/python3.11/site-packages/gi /usr/lib/python3.11/site-packages/gi/overrides /usr/lib/python3.11/site-packages/gi/overrides/BlockDev.py

---
 ...ir-for-multilib-when-cross-compiling.patch | 32 +++++++++++++++++++
 .../libblockdev/libblockdev_3.03.bb           |  3 +-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/libblockdev/files/0001-fix-pythondir-for-multilib-when-cross-compiling.patch
meta-oe/recipes-extended/libblockdev/files/0001-fix-pythondir-for-multilib-when-cross-compiling.patch new file +32 -0
new file mode 100644
index 0000000000..ec3a9fe470
@@ -0,0 +1,32 @@
+From 297abed277ce3aa0cf12adbfda3c8581afdba850 Mon Sep 17 00:00:00 2001
+From: Chen Qi <[email protected]>
+Date: Sun, 8 Oct 2023 19:30:29 -0700
+Subject: [PATCH] fix pythondir for multilib when cross compiling
+
+In case of cross compiling + multilib, the 'shell python3' line is
+not likely to give out correct result. Make use of pythondir instead.
+
+This patch is related to meta/recipes-devtools/automake/automake/0001-automake-Update-for-python.m4-to-respect-libdir.patch
+in oe-core, so this one is marked as oe specific.
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <[email protected]>
+---
+ src/python/gi/overrides/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/python/gi/overrides/Makefile.am b/src/python/gi/overrides/Makefile.am
+index 5e8e75f7..7c30601c 100644
+--- a/src/python/gi/overrides/Makefile.am
++++ b/src/python/gi/overrides/Makefile.am
+@@ -1,5 +1,5 @@
+ if WITH_PYTHON3
+-py3libdir = $(shell python3 -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '${exec_prefix}'}))")
++py3libdir = $(pythondir)
+ py3overridesdir = $(py3libdir)/gi/overrides
+ dist_py3overrides_DATA = BlockDev.py
+ endif
+-- 
+2.42.0
+
meta-oe/recipes-extended/libblockdev/libblockdev_3.03.bb +2 -1
index 670bebd37b..99175e6112 100644
@@ -13,7 +13,8 @@ inherit autotools gobject-introspection pkgconfig lib_package
 DEPENDS = "autoconf-archive-native glib-2.0 kmod udev libnvme"
 
 SRC_URI = "git://github.com/storaged-project/libblockdev;branch=master;protocol=https \
-"
+           file://0001-fix-pythondir-for-multilib-when-cross-compiling.patch \
+           "
 SRCREV = "38378931d285b91333ff2e2a391b1fe91072f9bb"
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.42.0