[neon/qt/qbs/Neon/release] debian/patches: debian/patch: Add tests-Make-sure-we-handle-prefix-cases-where-libPath patch

Marius Gripsgard null at kde.org
Thu May 5 12:48:32 BST 2022


Git commit e8d442c8d77d0a69d22fefd474073e6ec270ff2c by Marius Gripsgard.
Committed on 28/12/2021 at 20:58.
Pushed by jriddell into branch 'Neon/release'.

debian/patch: Add tests-Make-sure-we-handle-prefix-cases-where-libPath patch

This fixes build issue where prefix is wrong on debian systems.

A  +34   -0    debian/patches/0001-tests-Make-sure-we-handle-prefix-cases-where-libPath.patch
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt/qbs/commit/e8d442c8d77d0a69d22fefd474073e6ec270ff2c

diff --git a/debian/patches/0001-tests-Make-sure-we-handle-prefix-cases-where-libPath.patch b/debian/patches/0001-tests-Make-sure-we-handle-prefix-cases-where-libPath.patch
new file mode 100644
index 0000000..96a3829
--- /dev/null
+++ b/debian/patches/0001-tests-Make-sure-we-handle-prefix-cases-where-libPath.patch
@@ -0,0 +1,34 @@
+From 99cad8df71a4a3fc85348e79891a9047fc6fcde7 Mon Sep 17 00:00:00 2001
+From: Marius Gripsgard <marius at ubports.com>
+Date: Tue, 28 Dec 2021 21:51:22 +0100
+Subject: [PATCH] tests: Make sure we handle prefix cases where libPath have
+ arch triplet
+
+Example for this case is on debian where libPath is equal to
+/usr/lib/[arch]/ this would then end up with a prefix of /usr/lib, this
+is wrong as it should be /usr.
+
+This also adds an additional check to see if its starts with /lib as
+this might be a correct path on some systems, so we ignore this case.
+---
+ tests/auto/blackbox/tst_blackboxqt.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/auto/blackbox/tst_blackboxqt.cpp b/tests/auto/blackbox/tst_blackboxqt.cpp
+index 5d825f8ec..620cd2fa7 100644
+--- a/tests/auto/blackbox/tst_blackboxqt.cpp
++++ b/tests/auto/blackbox/tst_blackboxqt.cpp
+@@ -365,7 +365,9 @@ void TestBlackboxQt::pkgconfigQt()
+             lines, [&needle](const auto &line) { return !line.startsWith(needle); });
+     QCOMPARE(lines.size(), 1);
+     const auto libPath = lines[0].mid(needle.size());
+-    const auto prefix = QFileInfo(libPath).path();
++    auto prefix = QFileInfo(libPath).path();
++    if (prefix.endsWith("/lib") && !prefix.startsWith("/lib"))
++       prefix = QFileInfo(prefix).path();
+     const auto pkgConfigPath = libPath + "/pkgconfig/";
+     if (!QFileInfo(pkgConfigPath).exists())
+         QSKIP("No *.pc files found");
+-- 
+2.34.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 0e6a1a0..5ba63a9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ processlauncher_destdir.diff
 test_sanitizers_only_on_amd64.diff
 no_nosys_specs.diff
 disable_bad_assembly.diff
+0001-tests-Make-sure-we-handle-prefix-cases-where-libPath.patch



More information about the Neon-commits mailing list