Rename KDE4 symlinks it creates in KDEHOME that point out to different

temporary areas. Now KDE3 and KDE4 use totally different "temp" areas and
programs from both worlds could work more or less fine together, even when
sharing KDEHOME (this is NOT a recommended way to do things, but sometimes
you have to, like me). The only two minor problems there I'm aware now are:

1. Konqueror (KDE3) can't open web sites (some KHTML or kio_http issue?).

2. kded (KDE3) hangs when run automatically through kdeinit; killing it and
   starting manually fixes the situation. May be kbuildsycoca-related, will
   investigate more.

If you see any other problems, like hardcoded paths to those symlinks,
don't stay silent.

Oh, and it's really NOT recommended to install this update while having
KDE4 apps running.
This commit is contained in:
zhuk 2014-02-04 15:25:44 +00:00
parent d15ae48e64
commit a47212409d
5 changed files with 76 additions and 19 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.45 2014/02/04 08:56:40 zhuk Exp $
# $OpenBSD: Makefile,v 1.46 2014/02/04 15:25:44 zhuk Exp $
COMMENT-main = KDE core libraries
COMMENT-en_US = KDE en_US locale data
@ -11,7 +11,7 @@ PKGNAME-langlist = kde4-langlist-${MODKDE4_VERSION}
PKG_ARCH-en_US = *
PKG_ARCH-langlist = *
PKGSPEC-main = kdelibs->=4
REVISION-main = 2
REVISION-main = 3
DPB_PROPERTIES = parallel tag:kde4

View File

@ -1,8 +1,10 @@
$OpenBSD: patch-kdecore_kernel_kstandarddirs_cpp,v 1.1 2013/04/24 19:45:29 zhuk Exp $
Provide "libexec" resource type by default, and check for libexec items
first by default when searching for executables.
--- kdecore/kernel/kstandarddirs.cpp.orig Mon Dec 17 18:14:17 2012
+++ kdecore/kernel/kstandarddirs.cpp Mon Jan 7 19:03:17 2013
$OpenBSD: patch-kdecore_kernel_kstandarddirs_cpp,v 1.2 2014/02/04 15:25:44 zhuk Exp $
1. Provide "libexec" resource type by default, and check for libexec items
first by default when searching for executables.
2. Use separate from KDE3 links to special resource directories.
3. Use system constants instead of magic values.
--- kdecore/kernel/kstandarddirs.cpp.orig Thu Jan 2 23:26:54 2014
+++ kdecore/kernel/kstandarddirs.cpp Tue Feb 4 13:29:25 2014
@@ -279,6 +279,7 @@ QStringList KStandardDirs::allTypes() const
list.append(QLatin1String(types_string + types_indices[i]));
// Those are added manually by addKDEDefaults
@ -25,7 +27,37 @@ first by default when searching for executables.
return dir;
else
return !KGlobal::hasLocale() ? dir + filename
@@ -1341,7 +1346,7 @@ QString KStandardDirs::findExe( const QString& appname
@@ -994,14 +999,13 @@ KStandardDirs::realFilePath(const QString &filename)
void KStandardDirs::KStandardDirsPrivate::createSpecialResource(const char *type)
{
- char hostname[256];
- hostname[0] = 0;
- gethostname(hostname, 255);
+ char hostname[MAXHOSTNAMELEN];
+ gethostname(hostname, MAXHOSTNAMELEN);
+ hostname[MAXHOSTNAMELEN-1] = 0;
const QString localkdedir = m_prefixes.first();
- QString dir = localkdedir + QString::fromLatin1(type) + QLatin1Char('-') + QString::fromLocal8Bit(hostname);
- char link[1024];
- link[1023] = 0;
- int result = readlink(QFile::encodeName(dir).constData(), link, 1023);
+ QString dir = localkdedir + QString::fromLatin1(type) + QLatin1Char('4') + QLatin1Char('-') + QString::fromLocal8Bit(hostname);
+ char link[PATH_MAX+1];
+ int result = readlink(QFile::encodeName(dir).constData(), link, PATH_MAX);
bool relink = (result == -1) && (errno == ENOENT);
if (result > 0)
{
@@ -1045,7 +1049,7 @@ void KStandardDirs::KStandardDirsPrivate::createSpecia
if (system(QByteArray(QFile::encodeName(srv) + ' ' + type)) == -1) {
fprintf(stderr, "Error: unable to launch lnusertemp command" );
}
- result = readlink(QFile::encodeName(dir).constData(), link, 1023);
+ result = readlink(QFile::encodeName(dir).constData(), link, PATH_MAX);
}
}
if (result > 0)
@@ -1341,7 +1345,7 @@ QString KStandardDirs::findExe( const QString& appname
const QString& pstr,
SearchOptions options )
{
@ -34,7 +66,7 @@ first by default when searching for executables.
#ifdef Q_OS_WIN
QStringList executable_extensions = executableExtensions();
@@ -1371,7 +1376,7 @@ QString KStandardDirs::findExe( const QString& appname
@@ -1371,7 +1375,7 @@ QString KStandardDirs::findExe( const QString& appname
QString p = installPath("libexec") + appname;
QString result = checkExecutable(p, options & IgnoreExecBit);
if (!result.isEmpty()) {
@ -43,7 +75,7 @@ first by default when searching for executables.
return result;
}
@@ -1385,7 +1390,7 @@ QString KStandardDirs::findExe( const QString& appname
@@ -1385,7 +1389,7 @@ QString KStandardDirs::findExe( const QString& appname
// Check for executable in this tokenized path
result = checkExecutable(p, options & IgnoreExecBit);
if (!result.isEmpty()) {
@ -52,7 +84,7 @@ first by default when searching for executables.
return result;
}
}
@@ -1395,14 +1400,14 @@ QString KStandardDirs::findExe( const QString& appname
@@ -1395,14 +1399,14 @@ QString KStandardDirs::findExe( const QString& appname
p += appname;
result = checkExecutable(p, options & IgnoreExecBit);
if (!result.isEmpty()) {

View File

@ -1,8 +1,8 @@
$OpenBSD: patch-kinit_lnusertemp_c,v 1.1 2014/02/04 08:56:40 zhuk Exp $
$OpenBSD: patch-kinit_lnusertemp_c,v 1.2 2014/02/04 15:25:44 zhuk Exp $
Distinguish KDE4 temporary directories.
--- kinit/lnusertemp.c.orig Mon Feb 3 23:02:22 2014
+++ kinit/lnusertemp.c Mon Feb 3 23:03:12 2014
@@ -277,17 +277,17 @@ int main(int argc, char **argv)
+++ kinit/lnusertemp.c Tue Feb 4 13:24:38 2014
@@ -277,19 +277,19 @@ int main(int argc, char **argv)
if (strcmp(argv[1], "tmp") == 0)
{
@ -12,7 +12,8 @@ Distinguish KDE4 temporary directories.
- strcat(tmp_prefix, "/kde-");
+ strcat(tmp_prefix, "/kde4-");
kde_prefix = "/tmp-";
- kde_prefix = "/tmp-";
+ kde_prefix = "/tmp4-";
}
else if (strcmp(argv[1], "socket") == 0)
{
@ -22,9 +23,12 @@ Distinguish KDE4 temporary directories.
- strcat(tmp_prefix, "/ksocket-" );
+ strcat(tmp_prefix, "/k4socket-" );
kde_prefix = "/socket-";
- kde_prefix = "/socket-";
+ kde_prefix = "/socket4-";
}
@@ -297,9 +297,9 @@ int main(int argc, char **argv)
else if (strcmp(argv[1], "cache") == 0)
{
@@ -297,11 +297,11 @@ int main(int argc, char **argv)
if (!tmp || !tmp[0])
tmp = "/var/tmp";
@ -34,5 +38,8 @@ Distinguish KDE4 temporary directories.
- strcat(tmp_prefix, "/kdecache-" );
+ strcat(tmp_prefix, "/kde4cache-" );
kde_prefix = "/cache-";
- kde_prefix = "/cache-";
+ kde_prefix = "/cache4-";
}
res = build_link(tmp, tmp_prefix, kde_prefix);

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2014/01/15 19:42:12 zhuk Exp $
# $OpenBSD: Makefile,v 1.14 2014/02/04 15:25:44 zhuk Exp $
COMMENT-main = KDE core run-time components
COMMENT-locale = KDE locale data files
@ -6,6 +6,7 @@ DISTNAME = kde-runtime-${MODKDE4_VERSION}
PKGNAME-main = ${DISTNAME}
PKGNAME-locale = kde4-locale-${MODKDE4_VERSION}
PKG_ARCH-locale = *
REVISION-main = 0
DPB_PROPERTIES = parallel

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-kdontchangethehostname_khostname_cpp,v 1.1 2014/02/04 15:25:44 zhuk Exp $
Distinguish KDE4 temporary directories.
--- kdontchangethehostname/khostname.cpp.orig Tue Feb 4 14:49:11 2014
+++ kdontchangethehostname/khostname.cpp Tue Feb 4 14:56:15 2014
@@ -160,8 +160,10 @@ void KHostName::changeX()
void KHostName::changeStdDirs(const QByteArray &type)
{
// We make links to the old dirs cause we can't delete the old dirs.
- QByteArray oldDir = QFile::encodeName(QString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(QString( type )).arg(QString( oldName )));
- QByteArray newDir = QFile::encodeName(QString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(QString( type )).arg(QString( newName )));
+ QByteArray oldDir = QFile::encodeName(KGlobal::dirs()->localkdedir()
+ + QString(type) + QString::fromLatin1("4-") + QString( oldName ));
+ QByteArray newDir = QFile::encodeName(KGlobal::dirs()->localkdedir()
+ + QString(type) + QString::fromLatin1("4-") + QString( newName ));
KDE_struct_stat st_buf;