Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kpackage/files/, kde-frameworks/kpackage/
Date: Sat, 27 Apr 2019 20:51:57
Message-Id: 1556398296.1c974e92352cf577f88b1c214ec6b29ff20f1cd3.asturm@gentoo
1 commit: 1c974e92352cf577f88b1c214ec6b29ff20f1cd3
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 27 18:45:19 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 27 20:51:36 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c974e92
7
8 kde-frameworks/kpackage: Fix runtime crash
9
10 Package-Manager: Portage-2.3.65, Repoman-2.3.12
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 .../files/kpackage-5.57.0-runtime-crashfix.patch | 42 ++++++++++++++++++++++
14 kde-frameworks/kpackage/kpackage-5.57.0-r1.ebuild | 37 +++++++++++++++++++
15 2 files changed, 79 insertions(+)
16
17 diff --git a/kde-frameworks/kpackage/files/kpackage-5.57.0-runtime-crashfix.patch b/kde-frameworks/kpackage/files/kpackage-5.57.0-runtime-crashfix.patch
18 new file mode 100644
19 index 00000000000..5d13d3f8c3a
20 --- /dev/null
21 +++ b/kde-frameworks/kpackage/files/kpackage-5.57.0-runtime-crashfix.patch
22 @@ -0,0 +1,42 @@
23 +From c3e896e02f9a8dc92d6e26cdbc87fe5c6b9cf3bf Mon Sep 17 00:00:00 2001
24 +From: David Faure <faure@×××.org>
25 +Date: Sun, 14 Apr 2019 19:44:50 +0200
26 +Subject: Don't use qAsConst over a temporary variable
27 +
28 +Summary:
29 +(will crash because the temporary will be destroyed before being used)
30 +
31 +Detected with
32 + ag -sr qAsConst'\([^)]*\(' .
33 +
34 +Test Plan: builds
35 +
36 +Reviewers: mlaurent, cfeck, apol
37 +
38 +Reviewed By: mlaurent
39 +
40 +Subscribers: kde-frameworks-devel
41 +
42 +Tags: #frameworks
43 +
44 +Differential Revision: https://phabricator.kde.org/D20552
45 +---
46 + src/kpackage/package.cpp | 3 ++-
47 + 1 file changed, 2 insertions(+), 1 deletion(-)
48 +
49 +diff --git a/src/kpackage/package.cpp b/src/kpackage/package.cpp
50 +index 130eec6..801f1c2 100644
51 +--- a/src/kpackage/package.cpp
52 ++++ b/src/kpackage/package.cpp
53 +@@ -429,7 +429,8 @@ QStringList Package::entryList(const QByteArray &key) const
54 + QStringList list;
55 + for (const QString &prefix : qAsConst(d->contentsPrefixPaths)) {
56 + //qCDebug(KPACKAGE_LOG) << " looking in" << prefix;
57 +- for (const QString &path : qAsConst(it.value().paths)) {
58 ++ const QStringList paths = it.value().paths;
59 ++ for (const QString &path : paths) {
60 + //qCDebug(KPACKAGE_LOG) << " looking in" << path;
61 + if (it.value().directory) {
62 + //qCDebug(KPACKAGE_LOG) << "it's a directory, so trying out" << d->path + prefix + path;
63 +--
64 +cgit v1.1
65
66 diff --git a/kde-frameworks/kpackage/kpackage-5.57.0-r1.ebuild b/kde-frameworks/kpackage/kpackage-5.57.0-r1.ebuild
67 new file mode 100644
68 index 00000000000..a65b0d91a0d
69 --- /dev/null
70 +++ b/kde-frameworks/kpackage/kpackage-5.57.0-r1.ebuild
71 @@ -0,0 +1,37 @@
72 +# Copyright 1999-2019 Gentoo Authors
73 +# Distributed under the terms of the GNU General Public License v2
74 +
75 +EAPI=7
76 +
77 +inherit kde5
78 +
79 +DESCRIPTION="Framework to install and load packages of non binary content"
80 +LICENSE="LGPL-2+"
81 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
82 +IUSE="man"
83 +
84 +BDEPEND="
85 + man? ( $(add_frameworks_dep kdoctools) )
86 +"
87 +DEPEND="
88 + $(add_frameworks_dep karchive)
89 + $(add_frameworks_dep kcoreaddons)
90 + $(add_frameworks_dep ki18n)
91 +"
92 +RDEPEND="${DEPEND}"
93 +
94 +PATCHES=( "${FILESDIR}/${P}-runtime-crashfix.patch" )
95 +
96 +src_configure() {
97 + local mycmakeargs=(
98 + $(cmake-utils_use_find_package man KF5DocTools)
99 + )
100 +
101 + kde5_src_configure
102 +}
103 +
104 +src_test() {
105 + #bug 650214
106 + local myctestargs=( -E "(plasma-plasmoidpackagetest)" )
107 + kde5_src_test
108 +}