diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-03-19 02:34:04 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-03-19 02:34:50 +0100 |
commit | 69bda468b16a78ac6fcd84b1c08671bc6ea74726 (patch) | |
tree | ffa226d7d06da09349b8cb8129a85a23ce627174 /kde-apps/print-manager | |
parent | ecm.eclass: Drop KDE Applications 19.08.3 support (diff) | |
download | gentoo-69bda468b16a78ac6fcd84b1c08671bc6ea74726.tar.gz gentoo-69bda468b16a78ac6fcd84b1c08671bc6ea74726.tar.bz2 gentoo-69bda468b16a78ac6fcd84b1c08671bc6ea74726.zip |
kde-apps: Re-add KDE Applications 19.08.3 for arm64 only
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/print-manager')
3 files changed, 146 insertions, 0 deletions
diff --git a/kde-apps/print-manager/Manifest b/kde-apps/print-manager/Manifest index 67d0d21eadc5..8dc5889b464c 100644 --- a/kde-apps/print-manager/Manifest +++ b/kde-apps/print-manager/Manifest @@ -1 +1,2 @@ +DIST print-manager-19.08.3.tar.xz 245476 BLAKE2B 218c2d0676ecc5fbb2fbb8ad60cafdc85ccb388db3577f19867fe2e8a266617d010e67878f34d7c02c1e161923db24d817d7b624c1d6472f343d8bd9c025d66f SHA512 b68d9f28a2e387ee11c5756c18a08e60dfb31561721e97b7d55749c60b65b887c217e096ec8bc27004f7da22700500c767b894b84e16a6d571a4cc8e112ffcb8 DIST print-manager-19.12.3.tar.xz 251568 BLAKE2B 52f7ef3911c42c04a51ea1b7d398c312e1e77ebcac65cb29859aaaaa7250aed16035868c55738fcf1f6004d4ad7e70eefcb6bfb3e1387e18fdd3ccd4f47565fb SHA512 58b65aab504d1f51d238dad6ebbbc717573ec8a332807a3ca93a74d82d753255175a1b4609bef019209e03760e98853f0ce75bbee6a6141af72c7e77c84e3d36 diff --git a/kde-apps/print-manager/files/print-manager-19.08.3-crash-w-cups-jobs-w-duplicate-id.patch b/kde-apps/print-manager/files/print-manager-19.08.3-crash-w-cups-jobs-w-duplicate-id.patch new file mode 100644 index 000000000000..be4b2efd4935 --- /dev/null +++ b/kde-apps/print-manager/files/print-manager-19.08.3-crash-w-cups-jobs-w-duplicate-id.patch @@ -0,0 +1,87 @@ +From c93f2f16c30d10fbd0f4bfb4c0bf0cec07a4c93b Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid <aacid@kde.org> +Date: Mon, 2 Dec 2019 23:04:42 +0100 +Subject: Fix crash when cups returns jobs with duplicate id + +Summary: +For some reason my cups was giving me two withheld jobs with id 33 and two with id 40 + +That made the JobModel code crash, because it went like this + + * First job with id 33 found + * insertRow with 0 called + * Row 0 inserted + * Job at row 0 updated (from inside insertRow) + * Second job with id 33 found + * The "oh i already have this job code triggers", updates the job, then takesRow 0 and inserts at row 1. QStandardItemModel doesn't like getting a row add at 1 inserted when empty + * First job with id 40 found + * insertRow with 2 called + * Row 2 inserted, it fails, QStandardItemModel doesn't like getting a row add at 2 when empty + * Job at row 2 updated (from iniside insertRow) + * Crash because there's no row 2 in the model + +BUGS: 326289 + +Test Plan: Doesn't crash anymore with my weird cups list of pending jobs + +Reviewers: dantti + +Reviewed By: dantti + +Subscribers: ngraham, marcelm, fvogt, broulik, nicolasfella, kmaterka, kde-utils-devel + +Differential Revision: https://phabricator.kde.org/D25623 +--- + libkcups/JobModel.cpp | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/libkcups/JobModel.cpp b/libkcups/JobModel.cpp +index 73c5174..3c4878b 100644 +--- a/libkcups/JobModel.cpp ++++ b/libkcups/JobModel.cpp +@@ -174,6 +174,25 @@ void JobModel::getJobs() + m_processingJob.clear(); + } + ++static KCupsJobs sanitizeJobs(KCupsJobs jobs) ++{ ++ // For some reason sometimes cups has broken job queues with jobs with duplicated id ++ // our model doesn't like that at all so sanitize the job list before processing it ++ QVector<int> seenIds; ++ int i = 0; ++ while (i < jobs.count()) { ++ const int jobId = jobs.at(i).id(); ++ if (seenIds.contains(jobId)) { ++ qCWarning(LIBKCUPS) << "Found job with duplicated id" << jobId; ++ jobs.removeAt(i); ++ } else { ++ seenIds << jobId; ++ ++i; ++ } ++ } ++ return jobs; ++} ++ + void JobModel::getJobFinished(KCupsRequest *request) + { + if (request) { +@@ -181,7 +200,7 @@ void JobModel::getJobFinished(KCupsRequest *request) + // clear the model after so that the proper widget can be shown + clear(); + } else { +- const KCupsJobs jobs = request->jobs(); ++ const KCupsJobs jobs = sanitizeJobs(request->jobs()); + qCDebug(LIBKCUPS) << jobs.size(); + for (int i = 0; i < jobs.size(); ++i) { + const KCupsJob job = jobs.at(i); +@@ -207,7 +226,7 @@ void JobModel::getJobFinished(KCupsRequest *request) + } + } + +- // remove old printers ++ // remove old jobs + // The above code starts from 0 and make sure + // dest == modelIndex(x) and if it's not the + // case it either inserts or moves it. +-- +cgit v1.1 diff --git a/kde-apps/print-manager/print-manager-19.08.3.ebuild b/kde-apps/print-manager/print-manager-19.08.3.ebuild new file mode 100644 index 000000000000..db080241bf08 --- /dev/null +++ b/kde-apps/print-manager/print-manager-19.08.3.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +KFMIN=5.60.0 +PLASMA_MINIMAL=5.16.5 +QTMIN=5.12.3 +inherit ecm kde.org + +DESCRIPTION="Manage print jobs and printers in Plasma" +LICENSE="GPL-2" # TODO: CHECK +SLOT="5" +KEYWORDS="arm64" +IUSE="+gtk" + +DEPEND=" + >=kde-frameworks/kcmutils-${KFMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kdbusaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kiconthemes-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/knotifications-${KFMIN}:5 + >=kde-frameworks/kservice-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=kde-frameworks/kwindowsystem-${KFMIN}:5 + >=kde-frameworks/plasma-${KFMIN}:5 + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtnetwork-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + net-print/cups +" +RDEPEND="${DEPEND} + >=kde-plasma/kde-cli-tools-${PLASMA_MINIMAL}:5 + gtk? ( app-admin/system-config-printer ) +" + +pkg_postinst() { + ecm_pkg_postinst + + if [[ -z "${REPLACING_VERSIONS}" ]] && ! use gtk ; then + ewarn "By switching off \"gtk\" USE flag, you have chosen to do without" + ewarn "an important, though optional, runtime dependency:" + ewarn + ewarn "app-admin/system-config-printer" + ewarn + ewarn "${PN} will work nevertheless, but is going to be less comfortable" + ewarn "and will show the following error status during runtime:" + ewarn + ewarn "\"Failed to group devices: 'The name org.fedoraproject.Config.Printing" + ewarn "was not provided by any .service files'\"" + fi +} |