mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-21 10:37:22 -08:00
dev-libs/qgpgme: fix test failure with -D_GLIBCXX_ASSERTIONS
Followup to 7d7c7f1a9f. It ended up being
a bug in the implementation, which is in a header, so revbump.
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
From 7e5788d5f65d67f16014352583068ebcc7dd6252 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <7e5788d5f65d67f16014352583068ebcc7dd6252.1790626144.git.sam@gentoo.org>
|
||||
From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
|
||||
Date: Mon, 14 Sep 2026 11:39:37 +0200
|
||||
Subject: [PATCH] Avoid assertion on empty string or trailing delimiter
|
||||
|
||||
* src/util.h (split): Deal separately with trailing empty part.
|
||||
--
|
||||
|
||||
GnuPG-bug-id: 8456
|
||||
---
|
||||
src/util.h | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/util.h b/src/util.h
|
||||
index 3062c0b..30b184e 100644
|
||||
--- a/src/util.h
|
||||
+++ b/src/util.h
|
||||
@@ -71,14 +71,17 @@ static inline std::vector<std::string_view> split(const std::string_view s, char
|
||||
std::vector<std::string_view> result;
|
||||
std::string_view::size_type start = 0;
|
||||
std::string_view::size_type end;
|
||||
- do {
|
||||
+ while (start < s.size()) {
|
||||
end = s.find(delimiter, start);
|
||||
if (end == s.npos) {
|
||||
end = s.size();
|
||||
}
|
||||
result.emplace_back(std::addressof(s[start]), end - start);
|
||||
start = end + 1;
|
||||
- } while (end != s.size());
|
||||
+ }
|
||||
+ if (start == s.size()) {
|
||||
+ result.emplace_back();
|
||||
+ }
|
||||
return result;
|
||||
}
|
||||
|
||||
--
|
||||
2.55.0
|
||||
|
||||
@@ -27,12 +27,17 @@ DEPEND="
|
||||
>=dev-libs/libgpg-error-1.47:=
|
||||
>=dev-qt/qtbase-6.5.0:6
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
!<app-crypt/gpgme-2[qt6(-)]
|
||||
!dev-libs/qgpgme:1
|
||||
"
|
||||
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-gnupg-20260913 )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/0001-Avoid-assertion-on-empty-string-or-trailing-delimite.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DBUILD_WITH_QT5=OFF
|
||||
@@ -42,12 +47,3 @@ src_configure() {
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local CMAKE_SKIP_TESTS=(
|
||||
# Fails with -D_GLIBCXX_ASSERTIONS, reported upstream by email
|
||||
t-util6
|
||||
)
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
Reference in New Issue
Block a user