3
0
Fork 0
forked from mirrors/nixpkgs

kservice: update patches

This commit is contained in:
Thomas Tuegel 2015-10-14 06:32:29 -05:00
parent e904e1029d
commit e76d31616c
5 changed files with 52 additions and 28 deletions

View file

@ -0,0 +1,25 @@
From ae8919eb81abad369e4a26ffcd845b140983398d Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Wed, 14 Oct 2015 06:28:57 -0500
Subject: [PATCH 1/2] qdiriterator follow symlinks
---
src/sycoca/kbuildsycoca.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sycoca/kbuildsycoca.cpp b/src/sycoca/kbuildsycoca.cpp
index 1deae14..250baa8 100644
--- a/src/sycoca/kbuildsycoca.cpp
+++ b/src/sycoca/kbuildsycoca.cpp
@@ -208,7 +208,7 @@ bool KBuildSycoca::build()
QStringList relFiles;
const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, m_resourceSubdir, QStandardPaths::LocateDirectory);
Q_FOREACH (const QString &dir, dirs) {
- QDirIterator it(dir, QDirIterator::Subdirectories);
+ QDirIterator it(dir, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
while (it.hasNext()) {
const QString filePath = it.next();
Q_ASSERT(filePath.startsWith(dir)); // due to the line below...
--
2.5.2

View file

@ -0,0 +1,25 @@
From 46d124da602d84b7611a7ff0ac0862168d451cdb Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Wed, 14 Oct 2015 06:31:29 -0500
Subject: [PATCH 2/2] no canonicalize path
---
src/sycoca/vfolder_menu.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sycoca/vfolder_menu.cpp b/src/sycoca/vfolder_menu.cpp
index d3e31c3..d15d743 100644
--- a/src/sycoca/vfolder_menu.cpp
+++ b/src/sycoca/vfolder_menu.cpp
@@ -415,7 +415,7 @@ VFolderMenu::absoluteDir(const QString &_dir, const QString &baseDir, bool keepR
}
if (!relative) {
- QString resolved = QDir(dir).canonicalPath();
+ QString resolved = QDir::cleanPath(dir);
if (!resolved.isEmpty()) {
dir = resolved;
}
--
2.5.2

View file

@ -9,8 +9,8 @@ kdeFramework {
buildInputs = [ kcoreaddons kcrash kdbusaddons ];
propagatedBuildInputs = [ kconfig ki18n kwindowsystem ];
patches = [
./kservice-kbuildsycoca-follow-symlinks.patch
./kservice-kbuildsycoca-no-canonicalize-path.patch
./0001-qdiriterator-follow-symlinks.patch
./0002-no-canonicalize-path.patch
];
meta = {
maintainers = [ lib.maintainers.ttuegel ];

View file

@ -1,13 +0,0 @@
diff --git a/src/kbuildsycoca/kbuildsycoca.cpp b/src/kbuildsycoca/kbuildsycoca.cpp
index 69b1427..9c37a49 100644
--- a/src/kbuildsycoca/kbuildsycoca.cpp
+++ b/src/kbuildsycoca/kbuildsycoca.cpp
@@ -227,7 +227,7 @@ bool KBuildSycoca::build()
QStringList relFiles;
const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, g_resourceSubdir, QStandardPaths::LocateDirectory);
Q_FOREACH (const QString &dir, dirs) {
- QDirIterator it(dir, QDirIterator::Subdirectories);
+ QDirIterator it(dir, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
while (it.hasNext()) {
const QString filePath = it.next();
Q_ASSERT(filePath.startsWith(dir)); // due to the line below...

View file

@ -1,13 +0,0 @@
diff --git a/src/kbuildsycoca/vfolder_menu.cpp b/src/kbuildsycoca/vfolder_menu.cpp
index 2eb1275..e39a36f 100644
--- a/src/kbuildsycoca/vfolder_menu.cpp
+++ b/src/kbuildsycoca/vfolder_menu.cpp
@@ -412,7 +412,7 @@ VFolderMenu::absoluteDir(const QString &_dir, const QString &baseDir, bool keepR
}
if (!relative) {
- QString resolved = QDir(dir).canonicalPath();
+ QString resolved = QDir::cleanPath(dir);
if (!resolved.isEmpty()) {
dir = resolved;
}