From dba9a3fef80092f2b1da7e86e80d1f2f70879270 Mon Sep 17 00:00:00 2001 From: lofi Date: Sat, 10 Feb 2007 12:02:18 +0000 Subject: Apparently there *are* users that prefer to leave HAL turned off. Avoid letting them run into a patch error. Noticed by: Grzes --- x11/kde4-baseapps/Makefile | 3 +- ...ave_media_mounthelper-kio_media_mounthelper.cpp | 32 ++++++++++++++++++++++ ...ave_media_mounthelper-kio_media_mounthelper.cpp | 32 ---------------------- 3 files changed, 34 insertions(+), 33 deletions(-) create mode 100644 x11/kde4-baseapps/files/extrapatch-kioslave_media_mounthelper-kio_media_mounthelper.cpp delete mode 100644 x11/kde4-baseapps/files/patch-kioslave_media_mounthelper-kio_media_mounthelper.cpp (limited to 'x11/kde4-baseapps') diff --git a/x11/kde4-baseapps/Makefile b/x11/kde4-baseapps/Makefile index 993cd06..53cec9a 100644 --- a/x11/kde4-baseapps/Makefile +++ b/x11/kde4-baseapps/Makefile @@ -72,7 +72,8 @@ RUN_DEPENDS+= htdig:${PORTSDIR}/textproc/htdig .if defined(WITH_HAL) && ${OSVERSION} > 500035 EXTRA_PATCHES= ${FILESDIR}/extrapatch-kioslave_media_mediamanager-halbackend.cpp \ - ${FILESDIR}/extrapatch-kioslave_media_mediamanager-halbackend.h + ${FILESDIR}/extrapatch-kioslave_media_mediamanager-halbackend.h \ + ${FILESDIR}/extrapatch-kioslave_media_mounthelper-kio_media_mounthelper.cpp LIB_DEPENDS+= dbus-qt-1.1:${PORTSDIR}/devel/dbus-qt3 \ hal.1:${PORTSDIR}/sysutils/hal PLIST_SUB+= MEDIA="" diff --git a/x11/kde4-baseapps/files/extrapatch-kioslave_media_mounthelper-kio_media_mounthelper.cpp b/x11/kde4-baseapps/files/extrapatch-kioslave_media_mounthelper-kio_media_mounthelper.cpp new file mode 100644 index 0000000..508019a --- /dev/null +++ b/x11/kde4-baseapps/files/extrapatch-kioslave_media_mounthelper-kio_media_mounthelper.cpp @@ -0,0 +1,32 @@ +--- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Sat Jan 27 01:58:24 2007 ++++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Sat Jan 27 02:35:28 2007 +@@ -77,7 +77,9 @@ + m_isCdrom = medium.mimeType().find("dvd")!=-1 + || medium.mimeType().find("cd")!=-1; + +- if (args->isSet("u")) ++ bool do_eject = args->isSet("s") || args->isSet("e"); ++ ++ if (args->isSet("u") || do_eject) + { + DCOPRef mediamanager("kded", "mediamanager"); + DCOPReply reply = mediamanager.call( "unmount", medium.id()); +@@ -85,13 +87,14 @@ + reply.get(m_errorStr); + kdDebug() << "medium unmount " << m_errorStr << endl; + if (m_errorStr.isNull()) ++ { ++ if( do_eject ) ++ invokeEject(device, true); ++ else + ::exit(0); ++ } + else + error(); +- } +- else if (args->isSet("s") || args->isSet("e")) +- { +- invokeEject(device, true); + } + else + { diff --git a/x11/kde4-baseapps/files/patch-kioslave_media_mounthelper-kio_media_mounthelper.cpp b/x11/kde4-baseapps/files/patch-kioslave_media_mounthelper-kio_media_mounthelper.cpp deleted file mode 100644 index 508019a..0000000 --- a/x11/kde4-baseapps/files/patch-kioslave_media_mounthelper-kio_media_mounthelper.cpp +++ /dev/null @@ -1,32 +0,0 @@ ---- kioslave/media/mounthelper/kio_media_mounthelper.cpp.orig Sat Jan 27 01:58:24 2007 -+++ kioslave/media/mounthelper/kio_media_mounthelper.cpp Sat Jan 27 02:35:28 2007 -@@ -77,7 +77,9 @@ - m_isCdrom = medium.mimeType().find("dvd")!=-1 - || medium.mimeType().find("cd")!=-1; - -- if (args->isSet("u")) -+ bool do_eject = args->isSet("s") || args->isSet("e"); -+ -+ if (args->isSet("u") || do_eject) - { - DCOPRef mediamanager("kded", "mediamanager"); - DCOPReply reply = mediamanager.call( "unmount", medium.id()); -@@ -85,13 +87,14 @@ - reply.get(m_errorStr); - kdDebug() << "medium unmount " << m_errorStr << endl; - if (m_errorStr.isNull()) -+ { -+ if( do_eject ) -+ invokeEject(device, true); -+ else - ::exit(0); -+ } - else - error(); -- } -- else if (args->isSet("s") || args->isSet("e")) -- { -- invokeEject(device, true); - } - else - { -- cgit v1.1