forked from mirrors/nixpkgs
kpackage: update patches
This commit is contained in:
parent
8bc1acd926
commit
acb2d5d9db
|
@ -0,0 +1,25 @@
|
|||
From c134a83d226fc6b92412ee714bb6c7ab7e3a800f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Tuegel <ttuegel@mailbox.org>
|
||||
Date: Sun, 28 Mar 2021 10:25:18 -0500
|
||||
Subject: [PATCH 1/2] Allow external paths default
|
||||
|
||||
---
|
||||
src/kpackage/package.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/kpackage/package.cpp b/src/kpackage/package.cpp
|
||||
index 36f5600..881f176 100644
|
||||
--- a/src/kpackage/package.cpp
|
||||
+++ b/src/kpackage/package.cpp
|
||||
@@ -858,7 +858,7 @@ PackagePrivate::PackagePrivate()
|
||||
: QSharedData()
|
||||
, fallbackPackage(nullptr)
|
||||
, metadata(nullptr)
|
||||
- , externalPaths(false)
|
||||
+ , externalPaths(true)
|
||||
, valid(false)
|
||||
, checkedValid(false)
|
||||
{
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
From b1c0d2542234247a5051df015d70347597dfe8d8 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Tuegel <ttuegel@mailbox.org>
|
||||
Date: Sun, 28 Mar 2021 10:26:40 -0500
|
||||
Subject: [PATCH 2/2] QDirIterator follow symlinks
|
||||
|
||||
---
|
||||
src/kpackage/packageloader.cpp | 2 +-
|
||||
src/kpackage/private/packagejobthread.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/kpackage/packageloader.cpp b/src/kpackage/packageloader.cpp
|
||||
index f03d882..d5aee56 100644
|
||||
--- a/src/kpackage/packageloader.cpp
|
||||
+++ b/src/kpackage/packageloader.cpp
|
||||
@@ -234,7 +234,7 @@ QList<KPluginMetaData> PackageLoader::listPackages(const QString &packageFormat,
|
||||
} else {
|
||||
qCDebug(KPACKAGE_LOG) << "kpluginindex: Not cached" << plugindir;
|
||||
// If there's no cache file, fall back to listing the directory
|
||||
- const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories;
|
||||
+ const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories | QDirIterator::FollowSymlinks;
|
||||
const QStringList nameFilters = {QStringLiteral("metadata.json"), QStringLiteral("metadata.desktop")};
|
||||
|
||||
QDirIterator it(plugindir, nameFilters, QDir::Files, flags);
|
||||
diff --git a/src/kpackage/private/packagejobthread.cpp b/src/kpackage/private/packagejobthread.cpp
|
||||
index 3eed307..dd6ca6e 100644
|
||||
--- a/src/kpackage/private/packagejobthread.cpp
|
||||
+++ b/src/kpackage/private/packagejobthread.cpp
|
||||
@@ -108,7 +108,7 @@ bool indexDirectory(const QString &dir, const QString &dest)
|
||||
|
||||
QJsonArray plugins;
|
||||
|
||||
- QDirIterator it(dir, *metaDataFiles, QDir::Files, QDirIterator::Subdirectories);
|
||||
+ QDirIterator it(dir, *metaDataFiles, QDir::Files, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
const QString path = it.fileInfo().absoluteFilePath();
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/kpackage/package.cpp b/src/kpackage/package.cpp
|
||||
index 5aec9fd..b15c933 100644
|
||||
--- a/src/kpackage/package.cpp
|
||||
+++ b/src/kpackage/package.cpp
|
||||
@@ -820,7 +820,7 @@ PackagePrivate::PackagePrivate()
|
||||
: QSharedData(),
|
||||
fallbackPackage(nullptr),
|
||||
metadata(nullptr),
|
||||
- externalPaths(false),
|
||||
+ externalPaths(true),
|
||||
valid(false),
|
||||
checkedValid(false)
|
||||
{
|
|
@ -10,7 +10,7 @@ mkDerivation {
|
|||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
buildInputs = [ karchive kconfig kcoreaddons ki18n qtbase ];
|
||||
patches = [
|
||||
./allow-external-paths.patch
|
||||
./qdiriterator-follow-symlinks.patch
|
||||
./0001-Allow-external-paths-default.patch
|
||||
./0002-QDirIterator-follow-symlinks.patch
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
Index: kpackage-5.30.0/src/kpackage/packageloader.cpp
|
||||
===================================================================
|
||||
--- kpackage-5.30.0.orig/src/kpackage/packageloader.cpp
|
||||
+++ kpackage-5.30.0/src/kpackage/packageloader.cpp
|
||||
@@ -238,7 +238,7 @@ QList<KPluginMetaData> PackageLoader::li
|
||||
} else {
|
||||
//qDebug() << "Not cached";
|
||||
// If there's no cache file, fall back to listing the directory
|
||||
- const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories;
|
||||
+ const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories | QDirIterator::FollowSymlinks;
|
||||
const QStringList nameFilters = { QStringLiteral("metadata.json"), QStringLiteral("metadata.desktop") };
|
||||
|
||||
QDirIterator it(plugindir, nameFilters, QDir::Files, flags);
|
||||
Index: kpackage-5.30.0/src/kpackage/private/packagejobthread.cpp
|
||||
===================================================================
|
||||
--- kpackage-5.30.0.orig/src/kpackage/private/packagejobthread.cpp
|
||||
+++ kpackage-5.30.0/src/kpackage/private/packagejobthread.cpp
|
||||
@@ -121,7 +121,7 @@ bool indexDirectory(const QString& dir,
|
||||
|
||||
QJsonArray plugins;
|
||||
|
||||
- QDirIterator it(dir, *metaDataFiles, QDir::Files, QDirIterator::Subdirectories);
|
||||
+ QDirIterator it(dir, *metaDataFiles, QDir::Files, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
const QString path = it.fileInfo().absoluteFilePath();
|
Loading…
Reference in a new issue