diff options
author | lofi <lofi@FreeBSD.org> | 2006-12-21 04:42:54 +0800 |
---|---|---|
committer | lofi <lofi@FreeBSD.org> | 2006-12-21 04:42:54 +0800 |
commit | c5cde9209a2af9410a55793e47423d028d677ac8 (patch) | |
tree | 17febfa96fa2aebd6822eda472c966dd94f8e396 /x11/kdebase3 | |
parent | 93b17350cb4021d696f4033559a264e97a9337e9 (diff) | |
download | freebsd-ports-gnome-c5cde9209a2af9410a55793e47423d028d677ac8.tar.gz freebsd-ports-gnome-c5cde9209a2af9410a55793e47423d028d677ac8.tar.zst freebsd-ports-gnome-c5cde9209a2af9410a55793e47423d028d677ac8.zip |
Fix a linuxism in media:/ that prevents cd-roms from being mounted (by
trying to mount them with -noatime). Also make kio_media more debug-
chatty in case users find more problems.
Diffstat (limited to 'x11/kdebase3')
-rw-r--r-- | x11/kdebase3/Makefile | 1 | ||||
-rw-r--r-- | x11/kdebase3/files/extrapatch-kioslave_media_mediamanager-halbackend.cpp | 191 |
2 files changed, 191 insertions, 1 deletions
diff --git a/x11/kdebase3/Makefile b/x11/kdebase3/Makefile index d4de86a32d61..ba165d80215d 100644 --- a/x11/kdebase3/Makefile +++ b/x11/kdebase3/Makefile @@ -8,6 +8,7 @@ PORTNAME= kdebase PORTVERSION= ${KDE_VERSION} +PORTREVISION= 1 CATEGORIES= x11 kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src diff --git a/x11/kdebase3/files/extrapatch-kioslave_media_mediamanager-halbackend.cpp b/x11/kdebase3/files/extrapatch-kioslave_media_mediamanager-halbackend.cpp index 98bb0c705950..b4d8ef83056b 100644 --- a/x11/kdebase3/files/extrapatch-kioslave_media_mediamanager-halbackend.cpp +++ b/x11/kdebase3/files/extrapatch-kioslave_media_mediamanager-halbackend.cpp @@ -1,5 +1,5 @@ --- kioslave/media/mediamanager/halbackend.cpp.orig Sun Oct 1 19:31:54 2006 -+++ kioslave/media/mediamanager/halbackend.cpp Tue Dec 19 11:14:04 2006 ++++ kioslave/media/mediamanager/halbackend.cpp Wed Dec 20 20:22:28 2006 @@ -17,7 +17,6 @@ */ @@ -8,6 +8,38 @@ #include <stdlib.h> +@@ -242,11 +241,11 @@ + Medium* medium = new Medium(udi, ""); + + QMap<QString,QString> options = MediaManagerUtils::splitOptions(mountoptions(udi)); +- kdDebug() << "automount " << options["automount"] << endl; ++ kdDebug(1219) << "automount " << options["automount"] << endl; + if (options["automount"] == "true" && allowNotification ) { + QString error = mount(medium); + if (!error.isEmpty()) +- kdDebug() << "error " << error << endl; ++ kdDebug(1219) << "error " << error << endl; + } + setVolumeProperties(medium); + m_mediaList.addMedium(medium, allowNotification); +@@ -326,7 +325,7 @@ + } + + const char* mediumUdi = findMediumUdiFromUdi(udi); +- kdDebug() << "findMedumUdiFromUdi " << udi << " returned " << mediumUdi << endl; ++ kdDebug(1219) << "findMedumUdiFromUdi " << udi << " returned " << mediumUdi << endl; + if (!mediumUdi) + return; + +@@ -384,7 +383,7 @@ + { + Medium m( *cmedium ); + if ( setFstabProperties( &m ) ) { +- kdDebug() << "setFstabProperties worked" << endl; ++ kdDebug(1219) << "setFstabProperties worked" << endl; + m_mediaList.changeMediumState(m, false); + } + return; @@ -469,28 +468,23 @@ else mimeType = "media/dvd" + MOUNT_SUFFIX; @@ -48,3 +80,160 @@ } else { +@@ -575,7 +569,7 @@ + } + } + +- kdDebug() << mp << " " << mounted << " " << medium->deviceNode() << " " << endl; ++ kdDebug(1219) << mp << " " << mounted << " " << medium->deviceNode() << " " << endl; + QString fstype = medium->fsType(); + if ( fstype.isNull() ) + fstype = "auto"; +@@ -762,7 +756,7 @@ + if (t.endsWith("=")) + t = t.left(t.length() - 1); + valids[t] = true; +- kdDebug() << "valid " << t << endl; ++ kdDebug(1219) << "valid " << t << endl; + } + libhal_free_string_array(array); + QStringList result; +@@ -887,7 +881,7 @@ + + bool HALBackend::setMountoptions(const QString &name, const QStringList &options ) + { +- kdDebug() << "setMountoptions " << name << " " << options << endl; ++ kdDebug(1219) << "setMountoptions " << name << " " << options << endl; + + KConfig config("mediamanagerrc"); + config.setGroup(name); +@@ -927,7 +921,7 @@ + if (!(dmesg = dbus_message_new_method_call ("org.freedesktop.Hal", udi, + "org.freedesktop.Hal.Device.Volume", + "Mount"))) { +- kdDebug() << "mount failed for " << udi << ": could not create dbus message\n"; ++ kdDebug(1219) << "mount failed for " << udi << ": could not create dbus message\n"; + return i18n("Internal Error"); + } + +@@ -935,7 +929,7 @@ + DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &poptions, noptions, + DBUS_TYPE_INVALID)) + { +- kdDebug() << "mount failed for " << udi << ": could not append args to dbus message\n"; ++ kdDebug(1219) << "mount failed for " << udi << ": could not append args to dbus message\n"; + dbus_message_unref (dmesg); + return i18n("Internal Error"); + } +@@ -963,7 +957,7 @@ + return qerror; + } + +- kdDebug() << "mount queued for " << udi << endl; ++ kdDebug(1219) << "mount queued for " << udi << endl; + + dbus_message_unref (dmesg); + dbus_message_unref (reply); +@@ -974,7 +968,7 @@ + + void HALBackend::slotResult(KIO::Job *job) + { +- kdDebug() << "slotResult " << mount_jobs[job] << endl; ++ kdDebug(1219) << "slotResult " << mount_jobs[job] << endl; + if (job->error()) + { + KMessageBox::error(0, job->errorText()); +@@ -992,7 +986,7 @@ + + for (; it!=end; ++it) + { +- kdDebug() << "isInFstab -" << medium->deviceNode() << "- -" << (*it)->realDeviceName() << "- -" << (*it)->mountedFrom() << endl; ++ kdDebug(1219) << "isInFstab -" << medium->deviceNode() << "- -" << (*it)->realDeviceName() << "- -" << (*it)->mountedFrom() << endl; + if ((*it)->mountedFrom() == medium->deviceNode() || ( !medium->deviceNode().isEmpty() && (*it)->realDeviceName() == medium->deviceNode() ) ) + { + QStringList opts = (*it)->mountOptions(); +@@ -1012,7 +1006,7 @@ + QString mountPoint = isInFstab(medium); + if (!mountPoint.isNull()) + { +- kdDebug() << "triggering user mount " << medium->deviceNode() << " " << mountPoint << " " << medium->id() << endl; ++ kdDebug(1219) << "triggering user mount " << medium->deviceNode() << " " << mountPoint << " " << medium->id() << endl; + KIO::Job *job = KIO::mount( false, 0, medium->deviceNode(), mountPoint ); + connect(job, SIGNAL( result (KIO::Job *)), + SLOT( slotResult( KIO::Job *))); +@@ -1023,7 +1017,7 @@ + + QStringList soptions; + +- kdDebug() << "mounting " << medium->id() << "..." << endl; ++ kdDebug(1219) << "mounting " << medium->id() << "..." << endl; + + QMap<QString,QString> valids = MediaManagerUtils::splitOptions(mountoptions(medium->id())); + if (valids["flush"] == "true") +@@ -1036,10 +1030,10 @@ + + if (valids["ro"] == "true") + soptions << "ro"; +- ++#if 0 + if (valids["atime"] != "true") + soptions << "noatime"; +- ++#endif + if (valids["quiet"] == "true") + soptions << "quiet"; + +@@ -1121,7 +1115,7 @@ + QString mountPoint = isInFstab(medium); + if (!mountPoint.isNull()) + { +- kdDebug() << "triggering user unmount " << medium->deviceNode() << " " << mountPoint << endl; ++ kdDebug(1219) << "triggering user unmount " << medium->deviceNode() << " " << mountPoint << endl; + KIO::Job *job = KIO::unmount( medium->mountPoint(), false ); + connect(job, SIGNAL( result (KIO::Job *)), + SLOT( slotResult( KIO::Job *))); +@@ -1134,7 +1128,7 @@ + const char *options[2]; + + const char *udi = medium->id().latin1(); +- kdDebug() << "unmounting " << udi << "..." << endl; ++ kdDebug(1219) << "unmounting " << udi << "..." << endl; + + dbus_error_init(&error); + DBusConnection *dbus_connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error); +@@ -1147,7 +1141,7 @@ + if (!(dmesg = dbus_message_new_method_call ("org.freedesktop.Hal", udi, + "org.freedesktop.Hal.Device.Volume", + "Unmount"))) { +- kdDebug() << "unmount failed for " << udi << ": could not create dbus message\n"; ++ kdDebug(1219) << "unmount failed for " << udi << ": could not create dbus message\n"; + return i18n("Internal Error"); + } + +@@ -1157,7 +1151,7 @@ + if (!dbus_message_append_args (dmesg, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &options, 0, + DBUS_TYPE_INVALID)) + { +- kdDebug() << "unmount failed for " << udi << ": could not append args to dbus message\n"; ++ kdDebug(1219) << "unmount failed for " << udi << ": could not append args to dbus message\n"; + dbus_message_unref (dmesg); + return i18n("Internal Error"); + } +@@ -1165,7 +1159,7 @@ + dbus_error_init (&error); + if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, dmesg, -1, &error))) + { +- kdDebug() << "unmount failed for " << udi << ": " << error.name << " " << error.message << endl; ++ kdDebug(1219) << "unmount failed for " << udi << ": " << error.name << " " << error.message << endl; + QString qerror = error.message; + if (!strcmp(error.name, "org.freedesktop.Hal.Device.Volume.Busy")) { + qerror = QString("<qt>") + i18n("Device is Busy:"); +@@ -1201,7 +1195,7 @@ + return qerror; + } + +- kdDebug() << "unmount queued for " << udi << endl; ++ kdDebug(1219) << "unmount queued for " << udi << endl; + + dbus_message_unref (dmesg); + dbus_message_unref (reply); |