Build solidautoeject only on FreeBSD
ClosedPublic

Authored by broulik on Jun 27 2018, 9:16 AM.

Details

Summary

Solid's UDisks backend never emits the Solid::OpticalDrive::ejectPressed signal.
It is only present in HAL whereas Linux uses UDev these days.

Test Plan

Thanks to @adridg for FreeBSD testing. Turned out this is still needed there.

The "proper" approach would have been to check for HAVE_UDEV or something like that but HAL on Linux has been obsolete for ages.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jun 27 2018, 9:16 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 27 2018, 9:16 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jun 27 2018, 9:16 AM
broulik edited the summary of this revision. (Show Details)
fvogt added a comment.Jun 27 2018, 9:28 AM

Umount on eject press still works even without the kded module loaded.

mart added a subscriber: mart.Jun 27 2018, 9:42 AM

+1
(maybe build conditionally on freebsd if it's *really* necessary there)

Since the ticket is rather unclear on what functionality is being tested, or how:

  • Put a CD with an ISO9660 filesystem in the drive (I used one with Debian from 1995 on it)
  • When device notifier pops up, pick "open with filemanager" (*)
  • Ensure the silesystem isn't actually busy (e.g. no shells cd'd into that filesystem)
  • Press the physical eject button on the drive

On FreeBSD, the filesystem is unmounted and the CD is ejected. (And the directory in /media where the drive was mounted is removed **).

Notes:

  • * I get a "Error -- ... Client" popup with "Malformed URL" message, and an OK button. No idea what is causing that or where it's from -- but I don't get a file manager either.
  • ** This only works if the filesystem is mounted through the device notifier. Mounting it by hand (somewhere else) neither unmounts, nor ejects, nor removes the mount point (the last bit is good, since you must have made that mount point by hand, too)

It's not clear to me what this revision is trying to change (in terms of user-visible behavior) or how to test the change; what I've written above is current behavior on FreeBSD 11 with Plasma 5.12.5; HAL is running.

It's not clear to me what this revision is trying to change (in terms of user-visible behavior) or how to test the change

I think you could test it by disabling the "Drive Ejector" module in "Background Services" (kded settings) in System Settings. If pressing the button still ejects the CD as before, then this patch should be good on BSD / with HAL also.

anthonyfieroni added a subscriber: anthonyfieroni.EditedJun 27 2018, 2:39 PM

I have looking on https://bugs.kde.org/show_bug.cgi?id=394348 that's using same interface when ISO is umounting?

adridg added a comment.Jul 3 2018, 9:36 AM
  • Start systemsettings; under *workspace*, *startup and shutdown*, find *background services*.
  • Untick the box for *Drive Ejector*; also check status is *not running*, click *stop* button if it is still running.
  • Insert CD, pick *open in file manager* from the device notifier popup
  • Check that it's mounted, from a konsole
  • Press button on CD drive: no result
  • Choose eject from device notifier: CD is ejected
broulik updated this revision to Diff 37098.Jul 3 2018, 9:49 AM
broulik retitled this revision from Kill solidautoeject to Build solidautoeject only on FreeBSD.
broulik edited the summary of this revision. (Show Details)
broulik edited the test plan for this revision. (Show Details)
  • Keep it around for FreeBSD
This revision was not accepted when it landed; it landed in state Needs Review.Jul 10 2018, 9:44 AM
This revision was automatically updated to reflect the committed changes.